Open itaied246 opened 7 years ago
@itaied246 sorry I haven't seen your issue, if that is the custom logic of a proxy then it should be implemented otherwise, as the proxy is programmatic it should be implementable.
can you point me where the spec mentions this behavior ?
I don't think that is mentioned in the http rfc, however it is necessary to run a webserver behind a reverse proxy since otherwise redirects will send the browser to the internal url of the server, which is usually not correct.
so that should not be a behavior of the proxy itself but rather a rather a kind of plugin ?
It has to be configurable somehow, in Apache this is in the mod_proxy module, in Squid I'm not sure. If we implement a header modification plugin hook, rewrite Location could be a standard plugin
there are hooks at the moment for allowing header rewrite, look at ProxyRequestTest#testUpdateRequestHeaders
for the Location header we need a header rewrite of the response headers probably that is easy to implement if it isn't already there (also a response body filter would be interesting for some use-cases for elaborate filtering of the html for example)
Hi @alexlehm,
That should be doable now if/when my PR #4 is merged.
I didn't see any consideration to redirects, how do you handle those? For example, if my server behind the proxy response with
302
, you need to modify the responsehost
header back to the original.This is how apache do it: http://httpd.apache.org/docs/2.0/mod/mod_proxy.html#proxypassreverse