10 ms·
I'm getting CORS issues when I try to submit a project (Chrome, Safari). > Access to XMLHttpRequest at 'https://api.make.rs/projects/ https://api.make.rs/proje
by ecesena 5y ago
I'm getting CORS issues when I try to submit a project (Chrome, Safari).
> Access to XMLHttpRequest at 'https://api.make.rs/projects/ https://api.make.rs/projects/' from origin 'https://make.rs https://make.rs' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
- MucuMare 5y agoThis is weird, you are the second one who reports this today. I really wonder what's wrong as it works for the rest, and the CORS is configured correctly IMO (but seems it's not?). Sorry :/
- ecesena 5y agoDo you have multiple API instances by chance? Maybe one remained with "old" code?
- MucuMare 5y agoOnly one which is deleted everytime I deploy a new version. This one stresses me a lot at the moment so I need to figure out what causes it and then fix it haha.
- DrOctagon 5y agoI had a similar issue once with an app hosted on Azure. Large images were triggering the WAF sometimes as a ‘chunk’ of the image would falsely match a default firewall rule. The CORS error was because the ‘request blocked’ response was a html page without cross origin headers. Worth checking for that
- MucuMare 5y agoVery interesting, thanks for the pointer, much appreciated. I was suspecting it has to do with uploading large images but your comment made it clear where to look at now.
- dalmo3 5y agoYes, I've seen this same issue with AWS lambdas. Browser reports CORS errors but sending the same request with Postman returns HTTP500, which made me realise it was a malformed request.
- agucova 5y agoI'm getting this same problem while trying to set my profile at the welcome screen (or by going to settings). This is on Firefox Developer Edition. I then manually disabled CORS (I overrode it with an extension), and noticed it was failing again, but this time with an HTTP 413 to the API endpoint. I changed my image to something smaller (it was 3 MB), and it worked.
- MucuMare 5y agoThanks a lot for these details, it is very helpful. I'll deploy a fix later today to address this problem (cors errors for large images)
- MucuMare 5y agoFixed - Thank you all who gave me good pointers at what to look at.
- ecesena 5y agoConfirmed working now