Project

General

Profile

[Solved] make mod_setenv could really set a request header rather insert one

Added by georgexsh almost 15 years ago

mod_setenv will only add a new header entry to exist one
eg: if request contains header
'Host: foo'
we have a directive
setenv.add-request-header('host' => 'bar')
the result will be
'Host:foo, bar'
of course it will triger 400 error if pass this request to a backend server.

As I need request header to be override, follow patch was crated to do the job
added a new direct
setenv.set-request-header
as its name indicates, it will set/replace a request header rather add.

lighty1.5 is capable of this kind header rewrite using proxy_core.


Replies (1)

RE: [Solved] make mod_setenv could really set a request header rather insert one - Added by gstrauss about 7 years ago

lighttpd 1.4.46 will add new directives
  • setenv.set-request-header
  • setenv.set-response-header
  • setenv.set-environment

See also #650 and #2295

    (1-1/1)