<div dir="ltr">Hi,<div><br></div><div>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:</div><div><br></div><div>
<p class=""><span class=""> if ((conf->expires == NGX_HTTP_EXPIRES_OFF && conf->headers == NULL)<br></span> || r != r->main)<br> {<br> return ngx_http_next_header_filter(r);<br> }</p><p class="">Is there a particular reason to skip the filter for everything that's not a main request?</p><p class="">--<br>Marat</p></div></div>