Sub-request using Parent Request Body
Roman Vasilyev
roman at anchorfree.com
Fri Jan 7 23:14:19 MSK 2011
>> 2) when I'm just including *rewrite_by_lua* with simple return, I'm loosing
>> all headers from parent cite, please help me with best solution for that.
>>
> I'm not sure what you're talking about here. Can you provide a minimal
> config sample for this issue?
>
Showing 2 config which replacing whole headers from proxy to some
internal staff:
= *WRONG* headers =======
HTTP/1.1 200 OK
Server: nginx/0.9.3
Date: Fri, 07 Jan 2011 02:07:34 GMT
Content-Type: text/plain
Content-Length: 0
Connection: close
1) ==================
location / {
access_by_lua '
';
include proxy.conf;
}
2) ==================
location / {
rewrite_by_lua '
';
include proxy.conf;
}
= *CORRECT* headers ======
HTTP/1.1 200 OK
Server: nginx/0.9.3
Date: Fri, 07 Jan 2011 20:10:38 GMT
Content-Type: text/html
Connection: close
Accept-Ranges: bytes
Via: 1.1 netcache-c (NetCache NetApp/5.6.2R1D19)
==================
location / {
include proxy.conf;
}
>
>> 3) why you prefer NDK to clear nginx environment?
>>
> NDK just provides the "set_var" mechanism for ngx_lua. What do you
> mean by "clearing nginx environment"?
>
I mean if you using just this function may be better to include it into
your module
NDK patchnig nginx and it not clear, because you actually never need it.
> Cheers,
> -agentzh
>
More information about the nginx
mailing list