http-proxy-middleware icon indicating copy to clipboard operation
http-proxy-middleware copied to clipboard

Update options.changeOrigin description in docs

Open asvae opened this issue 7 years ago • 7 comments

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.

asvae avatar Jan 01 '17 16:01 asvae

Coverage Status

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

coveralls avatar Jan 01 '17 16:01 coveralls

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.

chimurai avatar Jan 08 '17 13:01 chimurai

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

asvae avatar Jan 09 '17 10:01 asvae

Great thanks!

chimurai avatar Jan 09 '17 11:01 chimurai

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? 😕

nicojs avatar Jun 08 '17 14:06 nicojs