aboutsummaryrefslogtreecommitdiffhomepage
path: root/caddytest
diff options
context:
space:
mode:
authorFrancis Lavoie <[email protected]>2024-12-02 08:06:38 -0500
committerGitHub <[email protected]>2024-12-02 08:06:38 -0500
commitb116dcea3d022cd2b060a978c499ac17e5d0a2e1 (patch)
treeac2be19ee8cff6e8cbb3f7d5a9d1b6772413e1d0 /caddytest
parent16d5b22349e7fe6aac876c2581df954578f595fd (diff)
downloadcaddy-b116dcea3d022cd2b060a978c499ac17e5d0a2e1.tar.gz
caddy-b116dcea3d022cd2b060a978c499ac17e5d0a2e1.zip
caddyhttp: Add `{?query}` placeholder (#6714)
* caddyhttp: Add `{prefixed_query}` placeholder * fastcgi: Preserve query during canonical redirect * Use orig_uri instead for the redirect, shorter Caddyfile shortcut
Diffstat (limited to 'caddytest')
-rw-r--r--caddytest/integration/caddyfile_adapt/php_fastcgi_expanded_form.caddyfiletest6
-rw-r--r--caddytest/integration/caddyfile_adapt/php_fastcgi_handle_response.caddyfiletest2
-rw-r--r--caddytest/integration/caddyfile_adapt/php_fastcgi_matcher.caddyfiletest2
-rw-r--r--caddytest/integration/caddyfile_adapt/php_fastcgi_subdirectives.caddyfiletest2
-rw-r--r--caddytest/integration/caddyfile_adapt/php_fastcgi_try_files_override.caddyfiletest2
5 files changed, 7 insertions, 7 deletions
diff --git a/caddytest/integration/caddyfile_adapt/php_fastcgi_expanded_form.caddyfiletest b/caddytest/integration/caddyfile_adapt/php_fastcgi_expanded_form.caddyfiletest
index 8a57b9e37..df2e24885 100644
--- a/caddytest/integration/caddyfile_adapt/php_fastcgi_expanded_form.caddyfiletest
+++ b/caddytest/integration/caddyfile_adapt/php_fastcgi_expanded_form.caddyfiletest
@@ -8,7 +8,7 @@ route {
}
not path */
}
- redir @canonicalPath {http.request.orig_uri.path}/ 308
+ redir @canonicalPath {orig_path}/{orig_?query} 308
# If the requested file does not exist, try index files
@indexFiles {
@@ -17,7 +17,7 @@ route {
split_path .php
}
}
- rewrite @indexFiles {http.matchers.file.relative}
+ rewrite @indexFiles {file_match.relative}
# Proxy PHP files to the FastCGI responder
@phpFiles {
@@ -50,7 +50,7 @@ route {
"handler": "static_response",
"headers": {
"Location": [
- "{http.request.orig_uri.path}/"
+ "{http.request.orig_uri.path}/{http.request.orig_uri.prefixed_query}"
]
},
"status_code": 308
diff --git a/caddytest/integration/caddyfile_adapt/php_fastcgi_handle_response.caddyfiletest b/caddytest/integration/caddyfile_adapt/php_fastcgi_handle_response.caddyfiletest
index 70a0780d1..9220e127e 100644
--- a/caddytest/integration/caddyfile_adapt/php_fastcgi_handle_response.caddyfiletest
+++ b/caddytest/integration/caddyfile_adapt/php_fastcgi_handle_response.caddyfiletest
@@ -42,7 +42,7 @@
"handler": "static_response",
"headers": {
"Location": [
- "{http.request.orig_uri.path}/"
+ "{http.request.orig_uri.path}/{http.request.orig_uri.prefixed_query}"
]
},
"status_code": 308
diff --git a/caddytest/integration/caddyfile_adapt/php_fastcgi_matcher.caddyfiletest b/caddytest/integration/caddyfile_adapt/php_fastcgi_matcher.caddyfiletest
index e5b331e31..9fdcc2ae1 100644
--- a/caddytest/integration/caddyfile_adapt/php_fastcgi_matcher.caddyfiletest
+++ b/caddytest/integration/caddyfile_adapt/php_fastcgi_matcher.caddyfiletest
@@ -33,7 +33,7 @@ php_fastcgi @test localhost:9000
"handler": "static_response",
"headers": {
"Location": [
- "{http.request.orig_uri.path}/"
+ "{http.request.orig_uri.path}/{http.request.orig_uri.prefixed_query}"
]
},
"status_code": 308
diff --git a/caddytest/integration/caddyfile_adapt/php_fastcgi_subdirectives.caddyfiletest b/caddytest/integration/caddyfile_adapt/php_fastcgi_subdirectives.caddyfiletest
index a04d66fe4..df69a7e8b 100644
--- a/caddytest/integration/caddyfile_adapt/php_fastcgi_subdirectives.caddyfiletest
+++ b/caddytest/integration/caddyfile_adapt/php_fastcgi_subdirectives.caddyfiletest
@@ -43,7 +43,7 @@ php_fastcgi localhost:9000 {
"handler": "static_response",
"headers": {
"Location": [
- "{http.request.orig_uri.path}/"
+ "{http.request.orig_uri.path}/{http.request.orig_uri.prefixed_query}"
]
},
"status_code": 308
diff --git a/caddytest/integration/caddyfile_adapt/php_fastcgi_try_files_override.caddyfiletest b/caddytest/integration/caddyfile_adapt/php_fastcgi_try_files_override.caddyfiletest
index a3381f675..75487a937 100644
--- a/caddytest/integration/caddyfile_adapt/php_fastcgi_try_files_override.caddyfiletest
+++ b/caddytest/integration/caddyfile_adapt/php_fastcgi_try_files_override.caddyfiletest
@@ -46,7 +46,7 @@ php_fastcgi localhost:9000 {
"handler": "static_response",
"headers": {
"Location": [
- "{http.request.orig_uri.path}/"
+ "{http.request.orig_uri.path}/{http.request.orig_uri.prefixed_query}"
]
},
"status_code": 308