# Console d'administration (docs/admin.md). Incluse par site.conf, livrée avec chaque release. # Écoute UNIQUEMENT sur la boucle locale du conteneur : Internet ne peut pas la joindre. Tailscale la publie # en HTTPS sur le réseau privé (« tailscale serve --bg --https=443 http://127.0.0.1:8081 »). server { listen 127.0.0.1:8081; server_name _; server_tokens off; root /srv/azuucine/current/admin; index index.html; include /etc/nginx/mime.types; add_header Content-Security-Policy "default-src 'none'; script-src 'self'; style-src 'self'; font-src 'self'; img-src 'self' data: https://qfgnxonqwldcfdjqhhjz.supabase.co; connect-src 'self' https://qfgnxonqwldcfdjqhhjz.supabase.co; base-uri 'none'; form-action 'self'; frame-ancestors 'none'" always; add_header X-Frame-Options "DENY" always; add_header X-Content-Type-Options "nosniff" always; add_header Referrer-Policy "no-referrer" always; add_header X-Robots-Tag "noindex, nofollow" always; add_header Cache-Control "no-store" always; add_header Permissions-Policy "camera=(), microphone=(), geolocation=(), payment=()" always; # Relais vers la fonction serveur « admin » : nginx ajoute le secret partagé (en-tête X-Admin-Gate). # Le secret est dans /etc/nginx/bobinoo-admin-gate.conf, créé une fois sur le VPS, JAMAIS dans le dépôt : # proxy_set_header X-Admin-Gate ""; # Fichier absent : la fonction répond 404 (la console affiche « pas reliée au serveur »), le site n'est pas touché. location = /api/admin { limit_except POST { deny all; } client_max_body_size 16k; resolver 1.1.1.1 9.9.9.9 valid=300s ipv6=off; resolver_timeout 5s; set $supabase qfgnxonqwldcfdjqhhjz.supabase.co; proxy_pass https://$supabase/functions/v1/admin; proxy_ssl_server_name on; proxy_ssl_name $supabase; proxy_set_header Host $supabase; proxy_set_header Cookie ""; proxy_set_header X-Forwarded-For ""; include /etc/nginx/bobinoo-admin-gate*.conf; proxy_read_timeout 30s; } location /assets/ { try_files $uri =404; } location / { try_files $uri /index.html; } }