# --- Krakowski Błysk — konfiguracja hostingu (Apache/LiteSpeed, np. proserwer.pl) ---
ErrorDocument 404 /404.html

# Nagłówki bezpieczeństwa
<IfModule mod_headers.c>
  Header always set X-Content-Type-Options "nosniff"
  Header always set Referrer-Policy "strict-origin-when-cross-origin"
  Header always set X-Frame-Options "SAMEORIGIN"
</IfModule>

# Cache przeglądarki
<IfModule mod_expires.c>
  ExpiresActive On
  ExpiresDefault "access plus 10 minutes"
  ExpiresByType text/html "access plus 10 minutes"
  ExpiresByType text/css "access plus 7 days"
  ExpiresByType application/javascript "access plus 7 days"
  ExpiresByType image/webp "access plus 30 days"
  ExpiresByType image/jpeg "access plus 30 days"
  ExpiresByType image/png "access plus 30 days"
  ExpiresByType image/svg+xml "access plus 30 days"
  ExpiresByType image/x-icon "access plus 30 days"
  ExpiresByType font/woff2 "access plus 1 year"
</IfModule>

# Kompresja (gzip)
<IfModule mod_deflate.c>
  AddOutputFilterByType DEFLATE text/html text/css application/javascript application/json image/svg+xml text/xml application/xml
</IfModule>

# --- OPCJONALNIE: wymuszenie https + domeny bez www ---
# Odkomentuj, jeśli chcesz twardo przekierować http->https oraz www->bez-www.
# UWAGA: jeśli po wgraniu pojawi się blad "zbyt wiele przekierowan", USUN ten blok
# (proserwer zwykle wymusza https samodzielnie).
# <IfModule mod_rewrite.c>
#   RewriteEngine On
#   RewriteCond %{HTTP:X-Forwarded-Proto} !https
#   RewriteCond %{HTTPS} off
#   RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
#   RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
#   RewriteRule ^ https://%1%{REQUEST_URI} [L,R=301]
# </IfModule>
