fix: route geo-blocker log entries to access.log

The caddy-blocker plugin already emits "request blocked" log entries
for geo/IP blocks, but they were going to Caddy's default log (stdout)
instead of /logs/access.log because http.handlers.blocker was not in
the access log include list. The existing log parser and dashboard were
already wired up to count these — they just never received the data.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
fuomag9
2026-04-03 00:05:14 +02:00
parent 6ce986f11f
commit ebc297190d
+1 -1
View File
@@ -1804,7 +1804,7 @@ async function buildCaddyDocument() {
loggingLogs.http_access = {
writer: { output: "file", filename: "/logs/access.log", mode: "0640" },
encoder: { format: loggingFormat },
include: ["http.log.access"]
include: ["http.log.access", "http.handlers.blocker"]
};
}
const loggingApp = { logging: { logs: loggingLogs } };