evoluteur / evolutility-ui-react

Framework for building CRUD UIs for Hasura GraphQL with models rather than code.
https://evoluteur.github.io/evodemo/
GNU Affero General Public License v3.0
113 stars 30 forks source link

CORS issue (Response for preflight is invalid) #5

Closed nick-tate closed 5 years ago

nick-tate commented 5 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.

david-pfx commented 5 years ago

Works fine for me. Windows 10.

evoluteur commented 5 years ago

It work fine for me on a Mac. You may need to change the header options in app.js (lines 34 to 37) in Evolutility-Server-Node.

evoluteur commented 5 years ago

It should be filed in Evolutility-Server-Node rather than Evolutility-UI-React. I'll close it here you can reopen it there. Thanks.

nick-tate commented 5 years ago

Thanks for the replies. I'm not a seasoned developer so I'll keep playing around with it. 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.