forked from ORGANISATION-KA-INTERNATIONALE/FEDIVERSE-OKI
d6efb6736f
- Données PeerTube (GADE), Castopod (KUTE) et Mastodon (BOKANTE) bakées au build via +page.server.ts (throttle + retry 429 + déduplication) - Charte OKI complète : tokens, thème sombre par défaut (clair opt-in, anti-FOUC), Archivo/Inter self-hébergées, flag-bar, sprite SVG (zéro emoji en interface, zéro Font Awesome/CDN) - i18n FR/EN par routage [[locale]], bundles JSON, hreflang, %lang% serveur - Pages : accueil, /video/[uuid] (embed, téléchargements, partage, commentaires, JSON-LD VideoObject), /categories/[id], /recherche (index JSON baké, recherche client), /direct (live + annonce multi-fuseaux), /dons, /mentions-legales, /offline + 404 kréyòl - Motion gwoka : KineticText (scrub view()), ScrollProgressBar, FlagChip, reveal syncopé, View Transitions, gate prefers-reduced-motion unique - PWA : manifest + Workbox generateSW (fallback /offline/), registerSW statique - Sécurité : CSP par page en <meta> (SHA-256 des inline via scripts/postbuild-csp.mjs) + headers globaux (_headers Cloudflare et .htaccess o2switch), redirections des anciennes URLs PHP - Doc : docs/DEPLOIEMENT-SVELTEKIT.md
45 lines
2.0 KiB
ApacheConf
45 lines
2.0 KiB
ApacheConf
# ANNU KUTE CED — configuration Apache (o2switch)
|
|
|
|
# Forcer HTTPS
|
|
RewriteEngine On
|
|
RewriteCond %{HTTPS} off
|
|
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
|
|
|
|
# Redirections des anciennes URLs PHP
|
|
RedirectMatch 301 ^/index\.php.*$ /
|
|
RedirectMatch 301 ^/direct\.php.*$ /direct/
|
|
RedirectMatch 301 ^/dons\.php.*$ /dons/
|
|
RedirectMatch 301 ^/mentions-legales\.php.*$ /mentions-legales/
|
|
RewriteRule ^video\.php\?uuid=([A-Za-z0-9]+).*$ /video/$1/ [R=301,L,QSD]
|
|
RewriteRule ^categories\.php\?id=([0-9]+).*$ /categories/$1/ [R=301,L,QSD]
|
|
RewriteRule ^recherche\.php\?q=(.*)$ /recherche/?q=$1 [R=301,L]
|
|
|
|
# Page 404
|
|
ErrorDocument 404 /404.html
|
|
|
|
# Headers de sécurité
|
|
<IfModule mod_headers.c>
|
|
Header always set Content-Security-Policy "style-src 'self' 'unsafe-inline'; img-src 'self' data: https://gade.o-k-i.net https://kute.o-k-i.net https://bokante.o-k-i.net; font-src 'self'; connect-src 'self'; media-src 'self' https://gade.o-k-i.net https://kute.o-k-i.net https://bokante.o-k-i.net; frame-src https://gade.o-k-i.net; frame-ancestors 'none'; base-uri 'self'; form-action 'self'; object-src 'none'"
|
|
Header always set Strict-Transport-Security "max-age=31536000"
|
|
Header always set X-Frame-Options "DENY"
|
|
Header always set X-Content-Type-Options "nosniff"
|
|
Header always set Referrer-Policy "strict-origin-when-cross-origin"
|
|
Header always set Permissions-Policy "accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=()"
|
|
</IfModule>
|
|
|
|
# Cache immutable des assets fingerprintés et des fonts
|
|
<IfModule mod_expires.c>
|
|
ExpiresActive On
|
|
ExpiresByType font/woff2 "access plus 1 year"
|
|
ExpiresByType image/png "access plus 1 week"
|
|
ExpiresByType image/x-icon "access plus 1 week"
|
|
</IfModule>
|
|
|
|
<IfModule mod_rewrite.c>
|
|
RewriteCond %{REQUEST_URI} ^/(_app|fonts)/ [NC]
|
|
RewriteRule .* - [E=CACHE_IMMUTABLE:1]
|
|
</IfModule>
|
|
<IfModule mod_headers.c>
|
|
Header set Cache-Control "public, max-age=31536000, immutable" env=CACHE_IMMUTABLE
|
|
</IfModule>
|