Cannot set request header in axios interceptor?

when logging in, the backend returns a token, to the front end with this token, for each request. I want to set it in the axios interceptor. The code is as follows:

:

I want to know how the interceptor can set Authorization to the request header

Mar.16,2021

config.headers ['access_token'] = getToken ()?

Menu