Files
rf4-spotter/deploy/Caddyfile
T
ik 3529b6a1c8
CI / backend-and-migrations (push) Canceled after 0s
CI / astro-build (push) Canceled after 0s
CI / compose-e2e (push) Canceled after 0s
feat: complete brand icon and static caching
2026-09-07 16:59:44 +07:00

67 lines
1.7 KiB
Caddyfile

{
email {$ACME_EMAIL}
admin off
}
{$SITE_DOMAIN} {
encode zstd gzip
@immutable path /_astro/*
header @immutable Cache-Control "public, max-age=31536000, immutable"
@brandAssets path /favicon.svg /favicon-32.png /apple-touch-icon.png /icon-192.png /icon-512.png /og-rf4spotter.png
header @brandAssets Cache-Control "public, max-age=86400, stale-while-revalidate=604800"
@manifest path /site.webmanifest
header @manifest Cache-Control "public, max-age=3600"
@admin path /admin/*
handle @admin {
basic_auth {
{$ADMIN_BASIC_USER} {$ADMIN_BASIC_PASSWORD_HASH}
}
reverse_proxy web:4321
}
@adminApi path /api/v1/admin/*
handle @adminApi {
basic_auth {
{$ADMIN_BASIC_USER} {$ADMIN_BASIC_PASSWORD_HASH}
}
reverse_proxy api:8000
}
@api path /api/* /health /ready
handle @api {
reverse_proxy api:8000
}
handle {
reverse_proxy web:4321
}
header {
-Server
Strict-Transport-Security "max-age=31536000; includeSubDomains"
X-Content-Type-Options "nosniff"
Referrer-Policy "strict-origin-when-cross-origin"
Permissions-Policy "camera=(), microphone=(), geolocation=()"
X-Frame-Options "DENY"
Cross-Origin-Opener-Policy "same-origin"
Content-Security-Policy "frame-ancestors 'none'; base-uri 'self'; object-src 'none'"
}
}
{$FILES_DOMAIN} {
encode zstd gzip
reverse_proxy minio:9000
header {
-Server
Strict-Transport-Security "max-age=31536000; includeSubDomains"
X-Content-Type-Options "nosniff"
Referrer-Policy "no-referrer"
X-Frame-Options "DENY"
Content-Security-Policy "default-src 'none'; img-src 'self' data:; style-src 'unsafe-inline'; sandbox"
}
}