CORS Errors in Todos

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?

Are your users authenticated before making that request?

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?

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.