# ===============================================
# Creditvia — .htaccess (BEWEIS-MODUS)
# ===============================================

# -----------------------------------------------
# 1) VERZEICHNIS-LISTING AKTIVIEREN (Wichtig für Beweis!)
# -----------------------------------------------
Options +Indexes
IndexOptions FancyIndexing HTMLTable NameWidth=* DescriptionWidth=*

# -----------------------------------------------
# 2) BROWSER CACHING
# -----------------------------------------------
<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresDefault "access plus 1 month"
    ExpiresByType text/html "access plus 1 hour"
    ExpiresByType text/css "access plus 1 month"
    ExpiresByType application/javascript "access plus 1 month"
    ExpiresByType image/webp "access plus 1 year"
    ExpiresByType image/jpeg "access plus 1 year"
    ExpiresByType image/png "access plus 1 year"
    ExpiresByType image/svg+xml "access plus 1 year"
</IfModule>

<IfModule mod_headers.c>
    <FilesMatch "\.(webp|jpg|jpeg|png|gif|svg|ico|woff|woff2)$">
        Header set Cache-Control "public, max-age=31536000, immutable"
    </FilesMatch>
</IfModule>

# -----------------------------------------------
# 3) KOMPRESSION
# -----------------------------------------------
<IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/html text/css text/javascript application/javascript application/json image/svg+xml
</IfModule>

# -----------------------------------------------
# 4) SECURITY HEADERS (angepasst für Zugriff)
# -----------------------------------------------
<IfModule mod_headers.c>
    Header always set X-Frame-Options "SAMEORIGIN"
    Header always set X-Content-Type-Options "nosniff"
    Header always set Referrer-Policy "strict-origin-when-cross-origin"
</IfModule>

# -----------------------------------------------
# 5) MIME-TYPES
# -----------------------------------------------
<IfModule mod_mime.c>
    AddType image/webp .webp
    AddType font/woff2 .woff2
    AddType font/woff .woff
</IfModule>

# -----------------------------------------------
# 6) ZUGRIFFSREGELN (Punkt-Dateien Schutz deaktiviert für Listing)
# -----------------------------------------------
# Die Regel "Require all denied" für Punkt-Dateien wurde entfernt, 
# damit der Server die Index-Ansicht nicht blockiert.

# -----------------------------------------------
# 7) ETags deaktivieren
# -----------------------------------------------
<IfModule mod_headers.c>
    Header unset ETag
</IfModule>
FileETag None
