Files
Claw (KI-Assistent) 2d9f1838b6
All checks were successful
Deploy Feature Branch to Test / deploy (push) Successful in 25s
Lint / PHP Syntax Check (push) Successful in 39s
Lint / CSS Lint (stylelint) (push) Successful in 1m25s
Lint / HTML Lint (htmlhint) (push) Successful in 1m10s
Lint / PHP Syntax Check (pull_request) Successful in 34s
Lint / CSS Lint (stylelint) (pull_request) Successful in 1m12s
Lint / HTML Lint (htmlhint) (pull_request) Successful in 1m8s
fix(security): add CSP and security headers via .htaccess (#41)
- Content-Security-Policy: strict CSP for static landingpage
- X-Content-Type-Options: nosniff
- X-Frame-Options: SAMEORIGIN
- Referrer-Policy: strict-origin-when-cross-origin

Fix #41
2026-05-21 23:04:52 +00:00

24 lines
962 B
ApacheConf
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Enable rewrite engine
RewriteEngine On
# Security Headers
<IfModule mod_headers.c>
Header set X-Content-Type-Options "nosniff"
Header set X-Frame-Options "SAMEORIGIN"
Header set Referrer-Policy "strict-origin-when-cross-origin"
Header set Content-Security-Policy "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self'; frame-src https://www.google.com/ https://www.google.de/; connect-src 'self'"
</IfModule>
# Legacy redirects (301) must be before the catch-all
RewriteRule ^impressum\.html$ /impressum [R=301,L]
RewriteRule ^datenschutz\.html$ /datenschutz [R=301,L]
RewriteRule ^haus-schleusingen\.html$ / [R=301,L]
# Serve existing files/directories directly (css, js, images, fonts, etc.)
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
# Route everything else through the front controller
RewriteRule ^(.*)$ index.php [QSA,L]