diff options
author | Francis Lavoie <lavofr@gmail.com> | 2022-09-15 12:05:36 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-15 10:05:36 -0600 |
commit | 9ad0ebc956f4317111c12e2c5428acd18522f025 (patch) | |
tree | 8745311ffa02013876d90e3b45715b6a6316e7e9 /caddytest | |
parent | a1ad20e4720391d847c58fcdcef7c8d9c287faf2 (diff) |
caddyhttp: Add 'skip_log' var to omit request from logs (#4691)
* caddyhttp: Implement `skip_log` handler
* Refactor to use vars middleware
Co-authored-by: Matt Holt <mholt@users.noreply.github.com>
Diffstat (limited to 'caddytest')
-rw-r--r-- | caddytest/integration/caddyfile_adapt/log_except_catchall_blocks.txt | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/caddytest/integration/caddyfile_adapt/log_except_catchall_blocks.txt b/caddytest/integration/caddyfile_adapt/log_except_catchall_blocks.txt index 57b63af..ed3b20d 100644 --- a/caddytest/integration/caddyfile_adapt/log_except_catchall_blocks.txt +++ b/caddytest/integration/caddyfile_adapt/log_except_catchall_blocks.txt @@ -1,5 +1,7 @@ http://localhost:2020 { log + skip_log /first-hidden* + skip_log /second-hidden* respond 200 } @@ -31,6 +33,36 @@ http://localhost:2020 { { "handle": [ { + "handler": "vars", + "skip_log": true + } + ], + "match": [ + { + "path": [ + "/second-hidden*" + ] + } + ] + }, + { + "handle": [ + { + "handler": "vars", + "skip_log": true + } + ], + "match": [ + { + "path": [ + "/first-hidden*" + ] + } + ] + }, + { + "handle": [ + { "handler": "static_response", "status_code": 200 } |