Log request bodies at nginx and view logs in Dozzle
nginx writes one JSON line per request, body included, to logs/nginx/payloads.log (nginx/payload_log.conf). Bodies mentioning a password, token or secret are logged as [redacted]. A `traffic` container tails the file so it shows up as its own stream in Dozzle, which is served at /dozzle/ behind the admin auth_request. Dozzle replaces the admin panel's Diagnostics tab, so that tab and the /admin/logs endpoint behind it are removed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -138,6 +138,9 @@ http {
|
||||
|
||||
access_log /var/log/nginx/access.log compact;
|
||||
|
||||
# JSON request-body log for Dozzle; see payload_log.conf.
|
||||
include /etc/nginx/payload_log.conf;
|
||||
|
||||
# nginx's bundled mime.types has no entry for .mjs, so ES modules would be
|
||||
# served as application/octet-stream and browsers refuse to execute them.
|
||||
# This adds the missing mapping without editing the shipped mime.types.
|
||||
|
||||
Reference in New Issue
Block a user