Déploiement CapRover : site statique construit sur le PC, servi par Caddy
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
14d1186e84
commit
84998608d5
@@ -0,0 +1,39 @@
|
||||
# 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
|
||||
}
|
||||
Reference in New Issue
Block a user