Welcome! Log In Create A New Profile

Advanced

Re: No headers filter for a subrequest

Maxim Dounin
March 16, 2015 08:24AM
Hello!

On Mon, Mar 16, 2015 at 03:14:15PM +0300, Marat Dakota wrote:

> Hi,
>
> 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?

The main reason is that there are no headers in subrequest
responses. Headers are returned by the main request only.

--
Maxim Dounin
http://nginx.org/

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

No headers filter for a subrequest

Marat Dakota 764 March 16, 2015 08:16AM

Re: No headers filter for a subrequest

Maxim Dounin 973 March 16, 2015 08:24AM

Re: No headers filter for a subrequest

Marat Dakota 491 March 16, 2015 08:28AM

Re: No headers filter for a subrequest

Marat Dakota 486 March 16, 2015 08:36AM

Re: No headers filter for a subrequest

Maxim Dounin 426 March 16, 2015 08:40AM

Re: No headers filter for a subrequest

Marat Dakota 486 March 16, 2015 08:50AM

Re: No headers filter for a subrequest

Maxim Dounin 432 March 16, 2015 09:02AM

Re: No headers filter for a subrequest

Marat Dakota 444 March 16, 2015 09:12AM

Re: No headers filter for a subrequest

Maxim Dounin 429 March 16, 2015 09:18AM

Re: No headers filter for a subrequest

Marat Dakota 459 March 16, 2015 09:30AM

Re: No headers filter for a subrequest

Maxim Dounin 458 March 16, 2015 10:00AM

Re: No headers filter for a subrequest

Yichun Zhang (agentzh) 493 March 16, 2015 04:56PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 107
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready