{ 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 } 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_path takes a single path, so use named matchers to also match the # bare prefix. The prefixes are stripped, so the backends see "/..." only. @actionblocks_website path /actionblocks/website /actionblocks/website/* handle @actionblocks_website { uri strip_prefix /actionblocks/website reverse_proxy actionblocks-website:80 } @actionblocks_server path /actionblocks/server /actionblocks/server/* handle @actionblocks_server { uri strip_prefix /actionblocks/server reverse_proxy actionblocks-server:8080 } handle { respond 404 } }