-
-
Notifications
You must be signed in to change notification settings - Fork 26.8k
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
Add default behavior for both String and Object proxy option in package.json #3369
Conversation
* Changelog for 1.0.15 * Update CHANGELOG.md * Update CHANGELOG.md
Lerna is acting up.
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed. If you have received this in error or have any questions, please contact us at [email protected]. Thanks! |
Sorry, I messed up git history. Would you mind doing
Then write down hashes of your commits, do |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
Can I ask you to propose these changes in #3366 and see if you can get a consensus? It's hard for me to navigate these issues, and people ask for different things about the proxy behavior. I'd like to get proxy users together so they can discuss what they need it to do. |
When we fetching data from another origin we should use proxy.
Normally, we set proxy option as String in pakcage.json:
It works as expected.
But, if we have several apis that are cross origin.Then we should set proxy option as an Object:
It doesn't work because of the proxy request header's
host
does not change the origin to thetarget
.So we still get cross origin errorWe can fix it as below:
I think it should be a default behavior both in String and Object proxy option