spacenick
spacenick

Reputation: 1185

Backbone/Node CORS : Options 200 OK, POST not working (Access-Control-Allow-Origin)

I'm facing the current problem which seems pretty strange to me. I'm using backbone on the front to handle my app and Node/Express on the back.

The OPTIONS request results in an 200 OK (I added a middleware on my node to allow CORS request) but the POST request ain't firing. Also the OPTIONS is 200 but it's still raising me an error in my console...

I've taken some screenshots :

Options Request: OPTIONS OK

Post Request: POST ERROR

Errors in the console errors

THanks by advance!

Upvotes: 0

Views: 1389

Answers (1)

Aditya Kumar Pandey
Aditya Kumar Pandey

Reputation: 991

Access-Control-Allow-Origin authorizes for http://localhost while the request is to http://localhost:5000 You need to allow for that too.

Upvotes: 3

Related Questions