Multiple CORS header error in API calls
ScoutPanda
Member
in Development
A few days back my web app was working normally, but today astiga ping api call started returning CORS error regarding duplicate headers. Specifically the error states Multiple CORS header 'Access-Control-Allow-Origin' not allowed. The following headers are duplicated.
Access-Control-Allow-Headers: *
Access-Control-Allow-Methods: *
Access-Control-Allow-Origin: *
Did something change on Astigas end recently?
Comments
Yes, we made an upload for a new landing page which requires CORS. I have seen the duplicates, although I didn't realise this was a big issue - what problem is it causing?
Well basically I cannot use my application at all, as all browsers that I have tested block the api call due to the duplicates. I'm not sure if it's something that I can handle on my end. Here's a picture from my console log https://imgur.com/a/GH3Px27
Ref: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors/CORSMultipleAllowOriginNotAllowed
Should be fixed now... is it working your end?
Access-Control-Allow-Headers: * and Access-Control-Allow-Methods: * are not duplicated anymore but Access-Control-Allow-Origin: * seems to still be duplicated which causes the same error.
Can you confirm which page? I'm not seeing this.
It's this one https://my-music-20393.web.app/account
Hmm, interestingly if I call the api path in my browser url the call works and the headers are not duplicated. I wonder why it works differently when my app calls it
Should be working now...?
Thank you for the swift help, seems to be working normally again! :)
👍️