How to log all headers in nginx?

前端 未结 3 1404
醉酒成梦
醉酒成梦 2020-12-15 02:39

How do I log all the headers the client (browser) has sent in Nginx? I also want to log the response headers. Note that I am using nginx as reverse proxy.

After goi

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-15 03:33

    After much research, I can conclude that it is not possible out of the box.

    Update- you can use openresty which comes with Lua. Using Lua one can do pretty cool things, including logging all of the headers to say, Redis or some other server

提交回复
热议问题