Simplify Caddy configuration

Remove the force removing of trailing slashes from URLs.
This commit is contained in:
Oliver Davies 2025-04-16 22:06:20 +01:00
parent 6da0e7fd91
commit 449f331fb5

View file

@ -14,20 +14,9 @@
extraConfig =
''
encode gzip
file_server
root * /var/www/vhosts/www.oliverdavies.uk
file_server {
disable_canonical_uris
}
# Remove trailing slashes from all URLs.
@trailingSlash {
path_regexp trailingSlash ^(.*)/$
not path /
}
redir @trailingSlash {http.regexp.trailingSlash.1} temporary
handle_errors {
@404 {
expression {http.error.status_code} == 404