evoluteur / evolutility-server-node

Model-driven REST APIs for CRUD and more, written in Javascript, using Node.js, Express, and PostgreSQL.
GNU Affero General Public License v3.0
112 stars 33 forks source link

CORS issue (Response for preflight is invalid) - Moved over from React-UI Repo #10

Closed nick-tate closed 6 years ago

nick-tate commented 6 years ago

Running into an issue working with the React-UI and Node-Server backed on the same localhost for seemingly "non-simple" requests meaning all of the base GET API calls to the backend work fine, but trying to use the edit views for PUT API calls are getting interrupted. The React-UI will throw a Network Error - and digging into the developer console its looking like a CORS-related issue.

http://localhost:2000/api/V1/winecellar/5: Response for preflight is invalid (redirect)

I'm curious if anyone else has encountered this issue while trying to stand up the base apps. Through further testing, it does seem more tied to my browser than anything. In Chrome (v. 69.0.3497.100) I would see this error about 90% of the attempts with some calls actually working as intended. I just switched over to Safari (v. 12) and everything seems to be working as it should.