Nginx Log RequestHeaders
Материал из noname.com.ua
Nginx Log Request Headers
log_format request_headers_all escape=json '"$request" $status' ' [REQUEST BODY]: $request_headers_all';
set_by_lua_block $request_headers{ local h = ngx.req.get_headers() local request_headers_all = "" for k, v in pairs(h) do local rowtext = "" rowtext = string.format(" %s='%s' ", k, v) request_headers_all = request_headers_all .. rowtext end return request_headers_all