Browse Source

[mod_proxy] fix proxy.forwarded and proxy.replace-http-host (fixes #2902)

config settings were not being copied into proxy request context

x-ref:
  "mod_proxy's “proxy.forwarded” option seems ignored when used with mod_auth."
  https://redmine.lighttpd.net/issues/2902
personal/stbuehler/fix-fdevent
Glenn Strauss 3 years ago
parent
commit
eebc1b0eec
  1. 2
      src/mod_proxy.c

2
src/mod_proxy.c

@ -982,6 +982,8 @@ static handler_t mod_proxy_check_extension(server *srv, connection *con, void *p
hctx->gw.opts.pdata = hctx;
hctx->gw.opts.headers = proxy_response_headers;
hctx->conf.replace_http_host = p->conf.replace_http_host;
hctx->conf.forwarded = p->conf.forwarded;
hctx->remap_hdrs = p->conf.header; /*(copies struct)*/
hctx->remap_hdrs.http_host = con->request.http_host;
hctx->remap_hdrs.upgrade &= (con->request.http_version == HTTP_VERSION_1_1);

Loading…
Cancel
Save