Authorization headers overwritten by Safari when using .htaccess. Custom header possible? #4105
-
When using a .htaccess, Safari will overwrite the Authorization header with the user-input from the htaccess promt, and thus AdonisJS 5 cant authorize the requests. Is there any way in the auth (api) config or some middleware to change AdonisJS 5 to use some custom header? |
Beta Was this translation helpful? Give feedback.
Answered by
thetutlage
Mar 14, 2023
Replies: 1 comment 1 reply
-
You can create a middleware and put it before the auth middleware. Inside that middleware you can read the value from your custom header and set it as |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
ivo-w3
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can create a middleware and put it before the auth middleware. Inside that middleware you can read the value from your custom header and set it as
Authorization
header