Welcome! Log In Create A New Profile

Advanced

Re: Lua headers

agentzh
February 28, 2011 03:00AM
On Sun, Feb 27, 2011 at 7:23 AM, Richard Kearsley
<Richard.Kearsley@m247.com> wrote:
> Hi

Sorry for the delay. I've been on holiday in the next few days :P

> Is it possible to set the headers of a lua request to my auth server?

Yes, use the ngx_headers_more module's more_set_input_headers
directive or ngx_proxy module's proxy_set_header directive in your
auth server's proxy location.

http://wiki.nginx.org/NginxHttpProxyModule#proxy_set_header

> I can set the querystring/args as shown in a few examples but never seen
> headers being set in lua?
>

BTW, by default, the main request's headers will be forwarded to your
subrequest destination locations. If that's not what you want, use the
proxy_pass_request_headers directive to disable that:

http://wiki.nginx.org/NginxHttpProxyModule#proxy_pass_request_headers

For now, setting subrequest headers from within Lua is not implemented
yet in ngx_lua. But it's on our TODO list :)

Cheers,
-agentzh

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

Lua headers

Richard Kearsley February 26, 2011 06:24PM

Re: Lua headers

agentzh February 28, 2011 03:00AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 95
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready