No headers filter for a subrequest

Marat Dakota dakota at
Mon Mar 16 12:14:15 UTC 2015


I was digging the reason why add_header in nginx config doesn't work for a
subrequest and I've found this in ngx_http_headers_filter_module.c:

    if ((conf->expires == NGX_HTTP_EXPIRES_OFF && conf->headers == NULL)
        || r != r->main)
        return ngx_http_next_header_filter(r);

Is there a particular reason to skip the filter for everything that's not a
main request?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx-devel mailing list