summaryrefslogtreecommitdiff
path: root/caddytest/integration/caddyfile_adapt
diff options
context:
space:
mode:
authorFrancis Lavoie <lavofr@gmail.com>2022-09-15 12:05:36 -0400
committerGitHub <noreply@github.com>2022-09-15 10:05:36 -0600
commit9ad0ebc956f4317111c12e2c5428acd18522f025 (patch)
tree8745311ffa02013876d90e3b45715b6a6316e7e9 /caddytest/integration/caddyfile_adapt
parenta1ad20e4720391d847c58fcdcef7c8d9c287faf2 (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/integration/caddyfile_adapt')
-rw-r--r--caddytest/integration/caddyfile_adapt/log_except_catchall_blocks.txt32
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
}