27 lines
983 B
ApacheConf
27 lines
983 B
ApacheConf
# Hochgeladene Logos: nur Bilder ausliefern, nie Programmcode ausführen
|
|
<FilesMatch "\.(php|php3|php4|php5|php7|php8|phtml|phar|pl|py|cgi|asp|aspx|jsp|sh|bash|exe|htaccess|htpasswd|env|html?|xhtml|shtml|xml|js|mjs)$">
|
|
<IfModule mod_authz_core.c>
|
|
Require all denied
|
|
</IfModule>
|
|
<IfModule !mod_authz_core.c>
|
|
Order deny,allow
|
|
Deny from all
|
|
</IfModule>
|
|
</FilesMatch>
|
|
# "php_flag" nur setzen, wenn PHP als Apache-Modul läuft. Unter FPM/CGI führt die Zeile sonst zu einem Serverfehler (HTTP 500) für jede Datei,
|
|
# auch für das Logo.
|
|
<IfModule mod_php.c>
|
|
php_flag engine off
|
|
</IfModule>
|
|
<IfModule mod_php7.c>
|
|
php_flag engine off
|
|
</IfModule>
|
|
<IfModule mod_php8.c>
|
|
php_flag engine off
|
|
</IfModule>
|
|
# Ein SVG-Logo darf im Bild-Tag laufen, aber nicht als eigene Seite Skripte ausführen
|
|
<IfModule mod_headers.c>
|
|
Header set X-Content-Type-Options "nosniff"
|
|
Header set Content-Security-Policy "default-src 'none'; style-src 'unsafe-inline'; sandbox"
|
|
</IfModule>
|