-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
proxy changeOrigin
set to true by default
#4302
Comments
Can you explain this more? What behavior does this turn on? Why is it bad? |
I have a file server running tus-node-server sitting behind my application server that I proxy to for file uploads and downloads. Tus by default reads the origin header to dynamically generate a location to ask the client to send requests to going forward. I had to spend some time debugging the problem I was having where my file server was sending back locations that were relative to my application server and not the client. While the fix is simple enough, it was not documented, nor is it the default behavior for the packages running the proxy under the hood. I'm not sure why a system would want to change the default behavior seeing as this is a proxy. Wouldn't all consumers of the proxied request want to know the original origin by default? I don't know what value there is in masking it. Ultimately, I would like to either have the CRA default match the underlying tooling defaults or at the very least have documentation helping advanced proxy users know that CRA alters the default behavior without them having to read the CRA source code. |
Looks like this is no longer an issue as it appears the |
There's still support for a "simple" |
It may be worthwhile to note this in the guide then. 🤷♂️ |
Added to #5127. |
You're also welcome to PR :-) |
I probably will! haha |
Is this a bug report?
No
Expected Behavior
When configuring the
proxy
setting in package.json to a string, requests to should notchangeOrigin
asfalse
is the default setting innode-http-proxy
.Actual Behavior
changeOrigin
is enabled by default.Potential Solutions
changeOrigin
by default for simple string proxy configuration.The text was updated successfully, but these errors were encountered: