nginx 的變量$request_body 即為http請求的body數據
只有在 location中 有 proxy_pass,fastcgi_pass,scgi_pass命令存在時,$request_body變量才會有值。
nginx在記錄http的body內容時,會將中文轉義為16進制
在nginx 1.11.8 以上版本中log_format 增加了escape=json 參數,可以不轉義變量內容:
log_format access escape=json '$request_time $remote_addr "$request" "$request_body" $status "$http_referer" "$http_user_agent" '