mockserver icon indicating copy to clipboard operation
mockserver copied to clipboard

Send default Host header when a request is forwarded to another server

Open celsogbj opened this issue 1 year ago • 0 comments

Some proxy servers use the Host http header to understand what traffic to serve. This is well documented on #431.

I would be nice if it could by made directly by mockserver on configuration, somethink like this:

mockserver.proxyRemotePort=443
mockserver.proxyRemoteHost=foo.com
mockserver.overhideHostHeader=true

setting overhideHostHeader to true would set the Host header with the value on proxyRemoteHost property.

Currently workaronud is the client set the Host header to mockserver that will pass it on. But this is not always feasible.

celsogbj avatar Jul 26 '23 14:07 celsogbj