From 63afffc2e317579a5bc618d5441ac238127114a0 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Tue, 24 Nov 2020 16:36:58 -0700 Subject: httpcaddyfile: Proper log config with catch-all blocks (fix #3878) --- .../caddyfile_adapt/log_except_catchall_blocks.txt | 80 ++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 caddytest/integration/caddyfile_adapt/log_except_catchall_blocks.txt (limited to 'caddytest/integration') diff --git a/caddytest/integration/caddyfile_adapt/log_except_catchall_blocks.txt b/caddytest/integration/caddyfile_adapt/log_except_catchall_blocks.txt new file mode 100644 index 0000000..a6fd051 --- /dev/null +++ b/caddytest/integration/caddyfile_adapt/log_except_catchall_blocks.txt @@ -0,0 +1,80 @@ +http://localhost:2020 { + log + file_server +} + +:2020 { + respond 418 +} +---------- +{ + "apps": { + "http": { + "servers": { + "srv0": { + "listen": [ + ":2020" + ], + "routes": [ + { + "match": [ + { + "host": [ + "localhost" + ] + } + ], + "handle": [ + { + "handler": "subroute", + "routes": [ + { + "handle": [ + { + "handler": "file_server", + "hide": [ + "./Caddyfile" + ] + } + ] + } + ] + } + ], + "terminal": true + }, + { + "handle": [ + { + "handler": "subroute", + "routes": [ + { + "handle": [ + { + "handler": "static_response", + "status_code": 418 + } + ] + } + ] + } + ], + "terminal": true + } + ], + "automatic_https": { + "skip": [ + "localhost" + ] + }, + "logs": { + "logger_names": { + "localhost:2020": "" + }, + "skip_unmapped_hosts": true + } + } + } + } + } +} \ No newline at end of file -- cgit v1.2.3