A question about add_header replication

agentzh agentzh at gmail.com
Tue Nov 17 13:16:17 MSK 2009


On Mon, Oct 5, 2009 at 4:11 PM, bit bull <bitbull.cn at gmail.com> wrote:
> hi,all:
>
>    hello, I config "add_header Server xxxx;", then I get response header:
>
> < HTTP/1.1 200 OK
> < Server: nginx/0.8.17
> < Date: Mon, 05 Oct 2009 07:59:18 GMT
> < Content-Type: text/html
> < Content-Length: 151
> < Last-Modified: Mon, 05 Oct 2009 07:24:51 GMT
> < Connection: keep-alive
> < Server: xxxx
> < Accept-Ranges: bytes
>
> We can see Server field is printed twice. I need replace first one.

The "more_set_headers" of the "headers_more" module will work the way
that you expect now:

     more_set_headers 'Server: xxxx';

Also, it applies to all the status code by default, unlike the
standard "headers" module. Use the -s option of the "more_set_headers"
directive if you want more control over it ;)

See http://github.com/agentzh/headers-more-nginx-module for more details.

Cheers,
-agentzh





More information about the nginx mailing list