Skip to content
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

Update options.changeOrigin description in docs #141

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

asvae
Copy link

@asvae asvae commented Jan 1, 2017

changeOrigin has nothing to do with origin header which is confusing and harmful when working with CORS. As CORS middleware sometimes makes decisions depending on origin header.

changeOrigin option handles solely host header.

@coveralls
Copy link

coveralls commented Jan 1, 2017

Coverage Status

Coverage remained the same at 96.97% when pulling 169338a on asvae:patch-1 into 8689cb4 on chimurai:master.

@chimurai
Copy link
Owner

chimurai commented Jan 8, 2017

Thanks for the PR @asvae.

Indeed it can be confusing.

This piece of documentation it taken directly from the http-proxy README.

Can you create a PR in the http-proxy project?
I'll merge it when it is accepted/merged there.

@asvae
Copy link
Author

asvae commented Jan 9, 2017

@chimurai Sure. Here it is.
Waiting for reply.

@chimurai
Copy link
Owner

chimurai commented Jan 9, 2017

Great thanks!

@nicojs
Copy link

nicojs commented Jun 8, 2017

Shouldn't the option be renamed to changeHost? We actually need the use case of changing the origin header. How to contribute if the name is already taken? 😕

@johnhunter
Copy link

Any news on this @chimurai ? This is particularly confusing as consuming projects assume it does change the Origin header, e.g. vitejs/vite#16557 (comment)

@nicojs raises a good point but renaming it would be a breaking change and there may be projects that depend on the setting.

I vote for merging this doc change so it is at least possible to understand the behaviour once you read the docs.

@johnhunter
Copy link

Ah, http-proxy docs need updated first. I'll check that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants