# GamesJi Updates - Apache/LiteSpeed configuration for shared hosting

# Make sure visiting the bare folder (gamesji.com/updates/) loads index.php
DirectoryIndex index.php index.html

# Block direct web access to sensitive folders (defense in depth —
# these folders should ideally sit outside the public web root)
<IfModule mod_authz_core.c>
  <FilesMatch "\.(sqlite|csv|py)$">
    Require all denied
  </FilesMatch>
</IfModule>
<IfModule !mod_authz_core.c>
  <FilesMatch "\.(sqlite|csv|py)$">
    Order allow,deny
    Deny from all
  </FilesMatch>
</IfModule>

# Force HTTPS (uncomment once SSL is active on your domain)
# RewriteEngine On
# RewriteCond %{HTTPS} off
# RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

# Default charset
AddDefaultCharset UTF-8

# Cache static assets
<IfModule mod_expires.c>
  ExpiresActive On
  ExpiresByType text/css "access plus 7 days"
  ExpiresByType application/javascript "access plus 7 days"
  ExpiresByType image/png "access plus 30 days"
  ExpiresByType image/svg+xml "access plus 30 days"
  ExpiresByType application/manifest+json "access plus 1 day"
</IfModule>

# Correct MIME type for the PWA manifest
<IfModule mod_mime.c>
  AddType application/manifest+json .json
</IfModule>

# Directory browsing off
Options -Indexes
