9951 explained code solutions for 126 technologies
See working example that returns your IP address based on this code:
server { location / { content_by_lua_block { ngx.say(ngx.var.remote_addr) } } }ctrl + cyoutubegithub
server { location / { content_by_lua_block { ngx.say(ngx.var.remote_addr) } } }
content_by_lua_block
nginx-lua module directive to specify block of Lua code
ngx.var.remote_addr
returns client IP address
ngx.say
output given text to client