aboutsummaryrefslogtreecommitdiffhomepage
path: root/caddytest
diff options
context:
space:
mode:
authorKévin Dunglas <[email protected]>2024-12-03 13:44:49 +0100
committerGitHub <[email protected]>2024-12-03 05:44:49 -0700
commitefd9251ad38a4fd9f7d900445400ac3c8e564c28 (patch)
treeae1457e6da8202688c67a1a47f67119e25423f31 /caddytest
parentb116dcea3d022cd2b060a978c499ac17e5d0a2e1 (diff)
downloadcaddy-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')
-rw-r--r--caddytest/integration/caddyfile_adapt/php_fastcgi_handle_response.caddyfiletest1
-rw-r--r--caddytest/integration/caddyfile_adapt/php_fastcgi_matcher.caddyfiletest3
-rw-r--r--caddytest/integration/caddyfile_adapt/php_fastcgi_subdirectives.caddyfiletest1
-rw-r--r--caddytest/integration/caddyfile_adapt/php_fastcgi_try_files_override_no_dir_index.caddyfiletest1
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"