worker_processes 1; error_log /dev/stderr warn; events { worker_connections 1024; } http { access_log /dev/stdout; lua_package_path "/app/lua/?.lua;;"; init_by_lua_block { local chain = require "chain" local ok, err = chain.init() if not ok then ngx.log(ngx.ERR, "chain init failed: ", tostring(err)) end } server { listen 8080; location = /v1/request { limit_except POST { deny all; } content_by_lua_file /app/lua/api/request.lua; } location ~ ^/v1/object/ { limit_except GET { deny all; } content_by_lua_file /app/lua/api/object.lua; } location = /health { content_by_lua_block { ngx.say("ok") } } } }