fodon
1
The code here was modified to prevent CORS errors in create.js
Ideally calling this should work from any website:
$.post(“https://XXXXXXXX.execute-api.us-east-1.amazonaws.com/dev/todos”, {text:‘joe@bloat.com’})
But it throws a CORS error.
I have used the cors=true in serverless.yml
I’ve also returned CORS headers in the create.js responses.
So what is going wrong?
Can you fix it for me?
Do you know why?
jayair
2
Are your users authenticated before making that request?
fodon
3
No they are not authenticated.
It works with Curl without any Auth.
Does the code require users to be authenticated?
Were you able to make the code work?
jayair
4
Well the code in the guide for sure needs your users to be authenticated. I’m not sure about the code you are using though.