From 8887adb027982e844965b4707b8595cee5845d54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Tue, 23 Nov 2021 17:40:20 +0100 Subject: logging: add a filter for cookies (#4425) * feat(logging): add a filter for cookies * Improve godoc and add validation --- caddytest/integration/caddyfile_adapt/log_filters.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'caddytest/integration') diff --git a/caddytest/integration/caddyfile_adapt/log_filters.txt b/caddytest/integration/caddyfile_adapt/log_filters.txt index 7873b1c..2693e9c 100644 --- a/caddytest/integration/caddyfile_adapt/log_filters.txt +++ b/caddytest/integration/caddyfile_adapt/log_filters.txt @@ -11,6 +11,10 @@ log { } request>headers>Authorization replace REDACTED request>headers>Server delete + request>headers>Cookie cookie { + replace foo REDACTED + delete bar + } request>remote_addr ip_mask { ipv4 24 ipv6 32 @@ -37,6 +41,20 @@ log { "filter": "replace", "value": "REDACTED" }, + "request\u003eheaders\u003eCookie": { + "actions": [ + { + "name": "foo", + "type": "replace", + "value": "REDACTED" + }, + { + "name": "bar", + "type": "delete" + } + ], + "filter": "cookie" + }, "request\u003eheaders\u003eServer": { "filter": "delete" }, -- cgit v1.2.3