35 lines
1.3 KiB
Caddyfile
35 lines
1.3 KiB
Caddyfile
|
{
|
||
|
# https://caddyserver.com/docs/caddyfile/options
|
||
|
email "privat@lukas-potthast.de"
|
||
|
http_port {$HTTP_PORT}
|
||
|
auto_https disable_redirects
|
||
|
}
|
||
|
|
||
|
{$ADDRESS_PREFIX}:{$HTTP_PORT} {
|
||
|
|
||
|
handle_path {$URL_PREFIX}* {
|
||
|
root * /srv
|
||
|
try_files {path} /index.html
|
||
|
encode {
|
||
|
gzip
|
||
|
match {
|
||
|
header Content-Type text/*
|
||
|
header Content-Type application/json*
|
||
|
header Content-Type application/js*
|
||
|
header Content-Type application/javascript*
|
||
|
header Content-Type application/wasm*
|
||
|
header Content-Type application/xhtml+xml*
|
||
|
header Content-Type application/atom+xml*
|
||
|
header Content-Type application/rss+xml*
|
||
|
header Content-Type image/svg+xml*
|
||
|
header Content-Type image/*
|
||
|
}
|
||
|
}
|
||
|
header Cache-Control max-age=0,no-cache,no-store,must-revalidate
|
||
|
file_server
|
||
|
}
|
||
|
|
||
|
handle {
|
||
|
respond "Not found" 404
|
||
|
}
|
||
|
}
|