-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve local development CORS handling #172
Conversation
@@ -1,7 +1,9 @@ | |||
REACT_APP_ENABLE_LOG_PROXY=false | |||
REACT_APP_CORE_API_URL=http://localhost:10000/jsapi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can take this one out too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried before leaving it in. It won't proxy ws:// so this has to stay.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to this thread it's a Chrome only issue: facebook/create-react-app#5280
But we can also fix it by having a src/setupProxy.js file, and adding the ws: true
option. facebook/create-react-app#5280 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like an easier workaround until that issue is resolved. How about I just drop that ticket number next to it as a comment?
supersede by #180 |
Avoids CORS problems with layouts/notebooks url by using proxy.
See https://create-react-app.dev/docs/proxying-api-requests-in-development/ for details.