access_by_lua 'ngx.exit(ngx.OK)';
This identically a bull operator will exit the phase handler and pass control along the transaction lifecycle. Note that exiting with ngx.OK is not the same as exiting with ngx.HTTP_OK; the latter would cause nginx to respond out of the phase handler with a 200 HTTP status response code, the former merely ends execution of the given phase without error.
> On Sep 9, 2016, at 20:12, Danomi Czaski <djc...@gmail.com> wrote:
>
> I have access_by_lua at the server context, but I don't want it
> inherited by one specific location that doesn't need access control.
> I put a dummy access_by_lua directive in that location, but it
> needs at least some valid Lua or it complains
>
> server
> {
> access_by_lua_file my_access.lua;
>
> location /no_access_required/
> {
> access_by_lua 'local s=1';
> ...
> }
>
> ...
> }
>
> It works, but seems a little clunky. Is there a nicer way?.