40 lines
1.1 KiB
Caddyfile
40 lines
1.1 KiB
Caddyfile
# Serveur statique d'Ustagammon. CapRover fournit le HTTPS devant ; ici on
|
|
# écoute en HTTP sur le port 80 du conteneur.
|
|
{
|
|
admin off
|
|
auto_https off
|
|
}
|
|
|
|
:80 {
|
|
root * /srv
|
|
# Types compressés : ceux de Caddy par défaut, plus les données du moteur
|
|
# (application/octet-stream, 8,7 Mo, 7,2 Mo compressés).
|
|
encode {
|
|
zstd
|
|
gzip
|
|
match {
|
|
header Content-Type text/*
|
|
header Content-Type application/json*
|
|
header Content-Type application/javascript*
|
|
header Content-Type application/wasm*
|
|
header Content-Type application/octet-stream*
|
|
header Content-Type application/manifest+json*
|
|
header Content-Type image/svg+xml*
|
|
}
|
|
}
|
|
|
|
# Les noms de fichiers ne changent pas d'une version à l'autre : le
|
|
# navigateur revalide chaque fichier (ETag) au lieu de garder une copie
|
|
# périmée.
|
|
header Cache-Control "no-cache"
|
|
header X-Content-Type-Options "nosniff"
|
|
header Referrer-Policy "no-referrer"
|
|
|
|
# Données du moteur (Emscripten) : extension inconnue de Caddy, qui
|
|
# devinerait text/xml d'après le début du fichier.
|
|
@engine_data path *.data
|
|
header @engine_data Content-Type "application/octet-stream"
|
|
|
|
file_server
|
|
}
|