# TamonMobile — Echoes of Hackers — pctamalou.fr/tamonmobile/
# Reste dans CE dossier. Pas de redirection vers la racine de pctamalou.fr.
Options -Indexes
DirectoryIndex index.html
AddDefaultCharset utf-8

<IfModule mod_rewrite.c>
  RewriteEngine On
  # Page inconnue : on affiche 404.html ici, sans renvoyer vers l'accueil du site.
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . 404.html [L]
</IfModule>
AddType image/svg+xml .svg
AddType application/json .json
AddType application/zip .zip

<IfModule mod_headers.c>
  Header always set Content-Security-Policy "default-src 'none'; script-src 'self'; style-src 'self'; img-src 'self' data:; font-src 'self'; connect-src 'self'; form-action 'none'; base-uri 'self'; frame-ancestors 'none'; manifest-src 'self'"
  Header always set X-Content-Type-Options "nosniff"
  Header always set X-Frame-Options "DENY"
  Header always set Referrer-Policy "strict-origin-when-cross-origin"
  Header always set Permissions-Policy "camera=(), microphone=(), geolocation=(), payment=(), usb=(), interest-cohort=()"
  Header always set Cross-Origin-Opener-Policy "same-origin"
  <FilesMatch "\.json$">
    Header set Cache-Control "public, max-age=86400"
  </FilesMatch>
  <FilesMatch "\.(css|js|svg|png)$">
    Header set Cache-Control "public, max-age=604800"
  </FilesMatch>
  <FilesMatch "\.html$">
    Header set Cache-Control "no-cache"
  </FilesMatch>
  <Files "TamonMobile-application.zip">
    Header set Content-Disposition "attachment; filename=TamonMobile-application.zip"
    Header set Cache-Control "public, max-age=3600"
  </Files>
</IfModule>

<IfModule mod_deflate.c>
  AddOutputFilterByType DEFLATE text/html text/css application/javascript image/svg+xml application/json
</IfModule>

<FilesMatch "^\.">
  Require all denied
</FilesMatch>
