Cors Hell In Ionic 3
I have a backend server (Spring Boot, proxied by nginx) that my Ionic application communicates with. With every single request, it sends the following headers: access-control-reque
Solution 1:
CORS
again, I am hoping that this might help someone:
Apparently wildcard(*
) value for Acccess-Control-Allow-Headers
header is only accepted in May 2016 (reference1, reference2), so some browsers might still not support it. So, changing from:
Access-Control-Allow-Headers: *
to
Access-Control-Allow-Headers: Content-Type, X-Auth-Token
(basically, the exact value of headers my application uses), I was able to resolve the issue. Apparently browser I am using on my desktop supports the wildcard header value, but the browser of the emulator and device doesn't. Definitely not a device vs. emulator issue, but a browser vs. browser issue.
Post a Comment for "Cors Hell In Ionic 3"