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.
> 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:
For now, setting subrequest headers from within Lua is not implemented
yet in ngx_lua. But it's on our TODO list :)