67 lines
1.3 KiB
Caddyfile
67 lines
1.3 KiB
Caddyfile
{
|
|
email {$CADDY_EMAIL:marvin.krausser277@gmail.com}
|
|
}
|
|
|
|
(common) {
|
|
encode zstd gzip
|
|
header {
|
|
Strict-Transport-Security "max-age=31536000; includeSubDomains"
|
|
X-Content-Type-Options "nosniff"
|
|
Referrer-Policy "strict-origin-when-cross-origin"
|
|
-Server
|
|
}
|
|
log
|
|
}
|
|
|
|
www.marvinkrausser.com {
|
|
redir https://marvinkrausser.com{uri} permanent
|
|
}
|
|
|
|
marvinkrausser.com {
|
|
import common
|
|
reverse_proxy cnn_website:8080
|
|
}
|
|
|
|
api.marvinkrausser.com {
|
|
import common
|
|
request_body {
|
|
max_size {$CADDY_MAX_BODY_API:16MB}
|
|
}
|
|
reverse_proxy cnn_api:8000
|
|
}
|
|
|
|
portfolio.marvinkrausser.com {
|
|
import common
|
|
reverse_proxy portfolio_website:8081
|
|
}
|
|
|
|
git.marvinkrausser.com {
|
|
import common
|
|
reverse_proxy gitea:3000
|
|
}
|
|
|
|
game.marvinkrausser.com {
|
|
import common
|
|
|
|
# /wizard and /wizard/website -> /wizard/website/ so relative asset paths resolve
|
|
redir /wizard /wizard/website/ permanent
|
|
redir /wizard/ /wizard/website/ permanent
|
|
redir /wizard/website /wizard/website/ permanent
|
|
|
|
# The prefixes are stripped, so the backends see "/..." instead of
|
|
# "/wizard/api/..." or "/wizard/website/...".
|
|
@wizard_api path /wizard/api /wizard/api/*
|
|
handle @wizard_api {
|
|
uri strip_prefix /wizard/api
|
|
reverse_proxy wizard_server:8083
|
|
}
|
|
|
|
handle_path /wizard/website/* {
|
|
reverse_proxy wizard_website:8082
|
|
}
|
|
|
|
handle {
|
|
respond 404
|
|
}
|
|
}
|