4

How do I go about logging all of the headers client browser has sent in Nginx? I understand that I can log a specific header, but I want to log all of the headers.

http {
    log_format upstream_time '$remote_addr - $remote_user [$time_local] '
                             '"$request" $status $body_bytes_sent '
                             '"$http_referer" "$http_user_agent"'
                             'rt=$request_time uct="$upstream_connect_time" uht="$upstream_header_time" urt="$upstream_response_time"';

    server {
        access_log /spool/logs/nginx-access.log upstream_time;
        ...
    }
}
inrob
  • 4,969
  • 11
  • 38
  • 51
  • may be related: https://stackoverflow.com/questions/24380123/how-to-log-all-headers-in-nginx – ᴍᴇʜᴏᴠ Oct 07 '19 at 08:42
  • 1
    Does this answer your question? [How to log all headers in nginx?](https://stackoverflow.com/questions/24380123/how-to-log-all-headers-in-nginx) – petr Apr 17 '21 at 18:56

0 Answers0