-
-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add authorization in request header #301
Comments
good catch...should have documented those options: https://github.com/i18next/i18next-xhr-backend/blob/master/src/ajax.js#L55 // custom request headers sets request.setRequestHeader(key, value)
customHeaders: {
authorization: 'foo',
// ...
}, |
Thanks, I understand that Or is there any way to change this middleware's config after the init phase? |
You should be able to modify backend.options, something like:
|
Great, thanks! |
This still isn't ideal, could it be made to accept a headers function also? Trying to make this as declarative as possible.. |
Is it possible to configure the request header and add authorization token before it is sent?
The text was updated successfully, but these errors were encountered: