Вопрос

I need to log request/response size(body+headers) in the access_log. Any idea how to do it in nginx? In apache we can do it using %I..%O format.

Это было полезно?

Решение

log_format combined '$request_length $bytes_sent';

According to docs $request_length includes the length of request headers and $bytes_sent is a total bytes sent to the client in response to the mentioned request.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top