Modify subrequest header

badtzhou nginx-forum at nginx.us
Thu Jan 22 06:59:43 UTC 2015


I am trying to use ngx_http_subrequest in my customize nginx module. I can
see from the code that the subrequest share the same request header with the
main request(sr->headers_in = r->headers_in). Is there a way to modify, add
or delete request header for subrequest without affecting the request header
of the main request?

I tried ngx_list_init(&sr->headers_in.headers and use ngx_list_push to push
new header in. And it is giving me a runtime error. Can someone point me to
the right direction?

Thanks

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,256239,256239#msg-256239



More information about the nginx mailing list