Téléverser les fichiers vers "/"
This commit is contained in:
+32
@@ -0,0 +1,32 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
# Compression
|
||||
gzip on;
|
||||
gzip_types text/html text/css application/javascript image/svg+xml application/xml;
|
||||
gzip_min_length 512;
|
||||
|
||||
# En-têtes de sécurité
|
||||
add_header X-Content-Type-Options nosniff always;
|
||||
add_header X-Frame-Options DENY always;
|
||||
add_header Referrer-Policy strict-origin-when-cross-origin always;
|
||||
add_header Permissions-Policy "camera=(), microphone=(), geolocation=()" always;
|
||||
add_header Content-Security-Policy "default-src 'self'; img-src 'self' data:; style-src 'self'; font-src 'self'; script-src 'self' 'unsafe-inline'; form-action 'self'; frame-ancestors 'none'" always;
|
||||
|
||||
# Cache long pour les ressources statiques, court pour le HTML
|
||||
location /assets/ {
|
||||
add_header Cache-Control "public, max-age=31536000, immutable";
|
||||
}
|
||||
location / {
|
||||
add_header Cache-Control "public, max-age=600";
|
||||
try_files $uri $uri/ $uri.html =404;
|
||||
}
|
||||
|
||||
# Le formulaire de contact : voir README (à router vers un backend ou Zammad)
|
||||
location /api/contact {
|
||||
return 501;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user