auth_request_set into variable and lua

djczaski djczaski at
Thu Dec 6 03:33:56 UTC 2012

On Wed, Dec 5, 2012 at 10:02 PM, agentzh <agentzh at> wrote:
> Hello!
> On Tue, Dec 4, 2012 at 7:36 PM, djczaski wrote:
>> I was looking at nginx as a replacement of another web server in order
>> to improve performance on an embedded platform.  Actually, I was able
>> to implement this through access_by_lua while I was having problems
>> and although it worked, performance was worse than using the fastcgi
>> authorizer on the other server.
> How did you write your Lua code in access_by_lua? Are you using
> blocking 3rd-party Lua libraries there?

No. Its basically:

    local res = ngx.location.capture("/auth")
    if res.status == 200 then
        ngx.var.test = res.headers["X-Boo"]

More information about the nginx mailing list