Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
38 lignes
1.4 KiB
Caddyfile
38 lignes
1.4 KiB
Caddyfile
# NON APPLIQUE. Bloc a ajouter au Caddy public APRES validation de Theo (DNS en place, mentions legales completees).
|
|
# Le site est statique : copier public/ vers /srv/vercors.me/ (chemin a confirmer sur l'hote retenu [A VERIFIER]).
|
|
# Le JSON public/data/meteo.json est ecrit toutes les 5-10 min par collecte/collecter_weatherlink.py (cron, ecriture atomique).
|
|
|
|
www.vercors.me {
|
|
redir https://vercors.me{uri} permanent
|
|
}
|
|
|
|
vercors.me {
|
|
root * /srv/vercors.me
|
|
encode zstd gzip
|
|
|
|
header {
|
|
Strict-Transport-Security "max-age=31536000"
|
|
X-Content-Type-Options "nosniff"
|
|
Referrer-Policy "strict-origin-when-cross-origin"
|
|
X-Frame-Options "DENY"
|
|
Permissions-Policy "geolocation=(), camera=(), microphone=()"
|
|
# Leaflet charge les tuiles OSM/OpenTopoMap ; tout le reste vient du site
|
|
Content-Security-Policy "default-src 'self'; img-src 'self' data: https://*.tile.openstreetmap.org https://*.tile.opentopomap.org; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline'; connect-src 'self'; frame-ancestors 'none'"
|
|
-Server
|
|
}
|
|
|
|
# pages : /station -> station.html, /a-propos -> a-propos.html
|
|
try_files {path} {path}.html {path}/index.html
|
|
|
|
@donnees path /data/*
|
|
header @donnees Cache-Control "no-cache"
|
|
@statique path /fonts/* /vendor/*
|
|
header @statique Cache-Control "public, max-age=2592000"
|
|
|
|
handle_errors {
|
|
rewrite * /404.html
|
|
file_server
|
|
}
|
|
file_server
|
|
}
|