Skip to content

Commit 356a838

Browse files
committed
Refactors Caddyfile to handle trailing question mark in URLs with redirection
Signed-off-by: Ismoiljon Umarov <hs.umarov21@gmail.com>
1 parent 8e4f52c commit 356a838

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

docker/Caddyfile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,14 @@ www.goat.uz {
3535
-X-Powered-By
3636
}
3737

38-
@emptyQuery {
39-
query ""
40-
}
41-
uri @emptyQuery strip_suffix ?
38+
# @emptyQuery {
39+
# query ""
40+
# }
41+
# uri @emptyQuery strip_suffix ?
42+
@trailingQuestion {
43+
expression "{uri}.endsWith('?')"
44+
}
45+
redir @trailingQuestion {path} 301
4246

4347
# MAINTENANCE MODE: START
4448
# respond `

0 commit comments

Comments
 (0)