Using add_header at server level context

Thijs Koerselman thijskoerselman at gmail.com
Mon Sep 30 13:42:50 UTC 2013


>From the add_header docs I understand that it works at location, http and
server context. But when I use add_header at the server level I don't see
the headers being added to the response.

For example my server config starts with:

  server {
    listen            9088;
    server_name       localhost;
    tcp_nodelay on;

    etag              on;
    access_log        on;

    add_header X-AppServer $upstream_addr;
    add_header X-AppServer-Status $upstream_status;
    add_header X-Cache $upstream_cache_status;

Am I missing something or is this just not working at the server level for
some reason?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20130930/0fd8fb7d/attachment.html>


More information about the nginx mailing list