News for hackers. Stuff that matters.
Re:Show HN: I created Make.rs – a place where makers show wh... by ecesena on Tuesday April 27, 2021 @03:59PM (#26960747)
I'm getting CORS issues when I try to submit a project (Chrome, Safari).

> Access to XMLHttpRequest at 'https://api.make.rs/projects/' from origin 'https://make.rs' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Re:Show HN: I created Make.rs – a place where makers show wh... by agucova on Wednesday April 28, 2021 @02:23AM (#26966308)
I'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.

Re:Show HN: I created Make.rs – a place where makers show wh... by MucuMare on Wednesday April 28, 2021 @06:06AM (#26967659)
Thanks 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)
Re:Show HN: I created Make.rs – a place where makers show wh... by MucuMare on Tuesday April 27, 2021 @04:04PM (#26960789)
This 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 :/
Re:Show HN: I created Make.rs – a place where makers show wh... by DrOctagon on Wednesday April 28, 2021 @03:26AM (#26966696)
I 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

Re:Show HN: I created Make.rs – a place where makers show wh... by dalmo3 on Wednesday April 28, 2021 @05:24PM (#26974407)
Yes, 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.
Re:Show HN: I created Make.rs – a place where makers show wh... by MucuMare on Wednesday April 28, 2021 @03:51AM (#26966842)
Very 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.
Re:Show HN: I created Make.rs – a place where makers show wh... by ecesena on Tuesday April 27, 2021 @06:53PM (#26962999)
Do you have multiple API instances by chance? Maybe one remained with "old" code?
Re:Show HN: I created Make.rs – a place where makers show wh... by MucuMare on Wednesday April 28, 2021 @03:32AM (#26966744)
Only 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.
Re:Show HN: I created Make.rs – a place where makers show wh... by MucuMare on Wednesday April 28, 2021 @07:20AM (#26968094)
Fixed - Thank you all who gave me good pointers at what to look at.
Re:Show HN: I created Make.rs – a place where makers show wh... by ecesena on Thursday April 29, 2021 @06:44PM (#26987717)
Confirmed working now