I want my server to allow the Authorization header for my mobile application. My web server is currently in sails and I am using sails. My route code
'post /auth/local' : { cors: { origin: '*' }, controller: 'AuthController', action: 'callback' },
When my client sends a request with "Authorization" in the header, I get an error
XMLHttpRequest cannot load http://localhost:1337/auth/local. Request header field Authorization is not allowed by Access-Control-Allow-Headers.
How do I indicate in the route code that the "Authorization" header is also allowed?
raju
source share