Update Caddyfile

This commit is contained in:
Roman Kelesidis 2025-08-21 20:49:27 +03:00
commit a46bd197e3
No known key found for this signature in database
GPG key ID: D8157C4D4C4C6DB4

View file

@ -1,10 +1,5 @@
# Caddy configuration for TorrentPier (Docker) # Caddy configuration for TorrentPier (Docker)
{
auto_https {$SSL_ENABLED:off}
admin off
}
{$TP_HOST}:{$TP_PORT:80} { {$TP_HOST}:{$TP_PORT:80} {
root * /app root * /app
encode gzip zstd encode gzip zstd
@ -27,8 +22,3 @@
} }
header @html_css_js Content-Type "{mime}; charset=utf-8" header @html_css_js Content-Type "{mime}; charset=utf-8"
} }
http://{$TP_HOST} {
@ssl_enabled expression {env.SSL_ENABLED} == "on"
redir @ssl_enabled https://{$TP_HOST}{uri} permanent
}