diff options
author | Kévin Dunglas <[email protected]> | 2024-12-03 13:44:49 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2024-12-03 05:44:49 -0700 |
commit | efd9251ad38a4fd9f7d900445400ac3c8e564c28 (patch) | |
tree | ae1457e6da8202688c67a1a47f67119e25423f31 /caddytest | |
parent | b116dcea3d022cd2b060a978c499ac17e5d0a2e1 (diff) | |
download | caddy-efd9251ad38a4fd9f7d900445400ac3c8e564c28.tar.gz caddy-efd9251ad38a4fd9f7d900445400ac3c8e564c28.zip |
fileserver: Add `first_exist_fallback` strategy for `try_files` (#6699)
* feat: add first_exist_or_fallback strategy for try_files
* fix tests
* linter
Diffstat (limited to 'caddytest')
4 files changed, 5 insertions, 1 deletions
diff --git a/caddytest/integration/caddyfile_adapt/php_fastcgi_handle_response.caddyfiletest b/caddytest/integration/caddyfile_adapt/php_fastcgi_handle_response.caddyfiletest index 9220e127e..3a857654f 100644 --- a/caddytest/integration/caddyfile_adapt/php_fastcgi_handle_response.caddyfiletest +++ b/caddytest/integration/caddyfile_adapt/php_fastcgi_handle_response.caddyfiletest @@ -58,6 +58,7 @@ "{http.request.uri.path}/index.php", "index.php" ], + "try_policy": "first_exist_fallback", "split_path": [ ".php" ] diff --git a/caddytest/integration/caddyfile_adapt/php_fastcgi_matcher.caddyfiletest b/caddytest/integration/caddyfile_adapt/php_fastcgi_matcher.caddyfiletest index 9fdcc2ae1..4d1298fcc 100644 --- a/caddytest/integration/caddyfile_adapt/php_fastcgi_matcher.caddyfiletest +++ b/caddytest/integration/caddyfile_adapt/php_fastcgi_matcher.caddyfiletest @@ -73,7 +73,8 @@ php_fastcgi @test localhost:9000 "{http.request.uri.path}", "{http.request.uri.path}/index.php", "index.php" - ] + ], + "try_policy": "first_exist_fallback" } } ] diff --git a/caddytest/integration/caddyfile_adapt/php_fastcgi_subdirectives.caddyfiletest b/caddytest/integration/caddyfile_adapt/php_fastcgi_subdirectives.caddyfiletest index df69a7e8b..9a9ab5ab0 100644 --- a/caddytest/integration/caddyfile_adapt/php_fastcgi_subdirectives.caddyfiletest +++ b/caddytest/integration/caddyfile_adapt/php_fastcgi_subdirectives.caddyfiletest @@ -59,6 +59,7 @@ php_fastcgi localhost:9000 { "{http.request.uri.path}/index.php5", "index.php5" ], + "try_policy": "first_exist_fallback", "split_path": [ ".php", ".php5" diff --git a/caddytest/integration/caddyfile_adapt/php_fastcgi_try_files_override_no_dir_index.caddyfiletest b/caddytest/integration/caddyfile_adapt/php_fastcgi_try_files_override_no_dir_index.caddyfiletest index dc4c3b886..203ab3b63 100644 --- a/caddytest/integration/caddyfile_adapt/php_fastcgi_try_files_override_no_dir_index.caddyfiletest +++ b/caddytest/integration/caddyfile_adapt/php_fastcgi_try_files_override_no_dir_index.caddyfiletest @@ -32,6 +32,7 @@ php_fastcgi localhost:9000 { "{http.request.uri.path}", "index.php" ], + "try_policy": "first_exist_fallback", "split_path": [ ".php", ".php5" |