Hi guys, currently trying to use my application bu...
# help
m
Hi guys, currently trying to use my application but when I try to create a note I'm getting this error
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at <https://vxabw2e10i.execute-api.us-east-1.amazonaws.com/listing>. (Reason: CORS header 'Access-Control-Allow-Origin' missing). Status code: 404.
I have it enabled in my handler so not sure what the issue is
r
It could be a different error masquerading as CORS, particularly since 404 is the status code. Is your URL correct? E.g. Are you missing the stage name in the URL? I.e. /my-stage/listing
d
Like Ross says, its usually something else, though I will add that its almost always something else for a REST Api Gateway, this doesnt seem to be the case for HTTP Api Gateways.
If you are using REST, you must also return CORS headers with every response manually, or the actual request will fail. Or, at least thats how I remember it.
r
That's right, you do