# TetaVolt - nasional.tetavoltev.com
# Build 20260907083701

RewriteEngine On

# Paksa HTTPS
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

DirectoryIndex index.html

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

<IfModule mod_expires.c>
  ExpiresActive On
  ExpiresByType text/css "access plus 1 year"
  ExpiresByType application/javascript "access plus 1 year"
  ExpiresByType image/svg+xml "access plus 1 year"
  ExpiresByType image/jpeg "access plus 1 year"
</IfModule>

# HTML dan service worker harus selalu segar supaya update langsung terlihat.
<FilesMatch "\.(html|webmanifest)$">
  Header set Cache-Control "no-cache, must-revalidate"
</FilesMatch>
<Files "sw.js">
  Header set Cache-Control "no-cache, must-revalidate"
</Files>
<Files "api-config.js">
  Header set Cache-Control "no-cache, must-revalidate"
</Files>

<IfModule mod_headers.c>
  Header always set X-Content-Type-Options "nosniff"
  Header always set X-Frame-Options "SAMEORIGIN"
  Header always set Referrer-Policy "strict-origin-when-cross-origin"
</IfModule>

AddType application/manifest+json .webmanifest
