]> git.sven.stormbind.net Git - sven/scripts.git/blob - nginx/show_header.conf
nginx config utilizing inline lua to print all HTTP request header
[sven/scripts.git] / nginx / show_header.conf
1 # output all HTTP header as received by nginx
2 location /header {
3  default_type 'text/plain';
4  content_by_lua_block {
5   local myheads=ngx.req.get_headers()
6   for key in pairs(myheads) do
7    local outp="Header '" .. key .. "': " .. myheads[key]
8    ngx.say(outp)
9   end
10  }
11 }