Return JSON responses when using OpenResty + Lua
Related posts I've written few related post that may be interesting have a look to first: Returning status code with OpenResty + Lua When ngx.exit using »
Related posts I've written few related post that may be interesting have a look to first: Returning status code with OpenResty + Lua When ngx.exit using »
If we want to return specific status codes from our Lua code we should have the following in mind: ngx.say("hello") return ngx.exit(404) »