From 8d038ca515ffaa4d37dca05a95181203b2db64e7 Mon Sep 17 00:00:00 2001 From: Matt Holt Date: Mon, 2 Nov 2020 14:20:12 -0700 Subject: fileserver: Improve and clarify file hiding logic (#3844) * fileserver: Improve and clarify file hiding logic * Oops, forgot to run integration tests * Make this one integration test OS-agnostic * See if this appeases the Windows gods * D'oh --- .../sort_directives_with_any_matcher_first.txt | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'caddytest') diff --git a/caddytest/integration/caddyfile_adapt/sort_directives_with_any_matcher_first.txt b/caddytest/integration/caddyfile_adapt/sort_directives_with_any_matcher_first.txt index d15f56b..6203a89 100644 --- a/caddytest/integration/caddyfile_adapt/sort_directives_with_any_matcher_first.txt +++ b/caddytest/integration/caddyfile_adapt/sort_directives_with_any_matcher_first.txt @@ -1,9 +1,9 @@ :80 -file_server +respond 200 @untrusted not remote_ip 10.1.1.0/24 -file_server @untrusted +respond @untrusted 401 ---------- { "apps": { @@ -30,20 +30,16 @@ file_server @untrusted ], "handle": [ { - "handler": "file_server", - "hide": [ - "Caddyfile" - ] + "handler": "static_response", + "status_code": 401 } ] }, { "handle": [ { - "handler": "file_server", - "hide": [ - "Caddyfile" - ] + "handler": "static_response", + "status_code": 200 } ] } -- cgit v1.2.3