http-proxy-middleware
http-proxy-middleware copied to clipboard
Update options.changeOrigin description in docs
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.
Coverage remained the same at 96.97% when pulling 169338a70a6f06e7b01dca06e1cfeda90da3e2b3 on asvae:patch-1 into 8689cb429577a7722b9334e702535cb752191c43 on chimurai:master.
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 Sure. Here it is. Waiting for reply.
Great thanks!
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? 😕