mirror of
https://github.com/kaboomserver/website.git
synced 2024-12-22 07:45:00 +00:00
Update htaccess
This commit is contained in:
parent
81bdad967f
commit
ddd1773ebe
2 changed files with 36 additions and 10 deletions
29
.htaccess
29
.htaccess
|
@ -1,11 +1,25 @@
|
|||
AddDefaultCharset utf-8
|
||||
AddCharset UTF-8 .css .js
|
||||
FileETag MTime Size
|
||||
Options +ExecCGI
|
||||
ServerSignature Off
|
||||
SetEnvIf Host ^ suppress-error-charset
|
||||
|
||||
<filesMatch ".(css|png|svg)$">
|
||||
Header set Cache-Control "public, max-age=604800"
|
||||
</filesMatch>
|
||||
AddType image/x-icon .ico
|
||||
AddType application/manifest+json .webmanifest
|
||||
|
||||
ErrorDocument 403 https://kaboom.pw/
|
||||
ErrorDocument 404 https://kaboom.pw/
|
||||
|
||||
<FilesMatch report$>
|
||||
SetHandler cgi-script
|
||||
</FilesMatch>
|
||||
|
||||
<FilesMatch ".(htm|html)$">
|
||||
Header set Content-Security-Policy "default-src 'none'; font-src data:; form-action 'self'; img-src 'self'; manifest-src 'self'; style-src 'self'; upgrade-insecure-requests; report-uri /report"
|
||||
Header set X-Frame-Options "DENY"
|
||||
Header set X-Xss-Protection "1; mode=block"
|
||||
</FilesMatch>
|
||||
|
||||
RewriteEngine On
|
||||
RewriteCond %{SERVER_PORT} 80
|
||||
|
@ -17,9 +31,6 @@ RewriteRule ^(.*)$ https://kaboom.pw/$1 [R=301,L]
|
|||
RewriteCond %{HTTP_HOST} ^www.flame.ga$
|
||||
RewriteRule ^(.*)$ https://kaboom.pw/$1 [R=301,L]
|
||||
|
||||
ErrorDocument 403 https://kaboom.pw/
|
||||
ErrorDocument 404 https://kaboom.pw/
|
||||
|
||||
AddOutputFilterByType DEFLATE text/plain
|
||||
AddOutputFilterByType DEFLATE text/html
|
||||
AddOutputFilterByType DEFLATE text/xml
|
||||
|
@ -30,11 +41,9 @@ AddOutputFilterByType DEFLATE application/rss+xml
|
|||
AddOutputFilterByType DEFLATE application/javascript
|
||||
AddOutputFilterByType DEFLATE application/x-javascript
|
||||
|
||||
Header set Cache-Control "public, max-age=0, must-revalidate"
|
||||
Header set Content-Security-Policy "connect-src 'none'; default-src 'none'; font-src data:; frame-src 'none'; img-src 'none'; media-src 'none'; object-src 'none'; script-src 'none'; style-src 'self'"
|
||||
Header set Referrer-Policy "no-referrer"
|
||||
Header set Strict-Transport-Security "max-age=63072000; includeSubdomains; preload"
|
||||
Header set Vary "Accept-Encoding"
|
||||
Header set X-Content-Type-Options "nosniff"
|
||||
Header set X-Frame-Options "DENY"
|
||||
Header set X-Xss-Protection "1; mode=block"
|
||||
Header unset Accept-Ranges
|
||||
Header unset Last-Modified
|
||||
|
|
17
report
Executable file
17
report
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/perl
|
||||
use CGI;
|
||||
my $q = new CGI;
|
||||
|
||||
my $data = CGI::param('POSTDATA');
|
||||
|
||||
if (($data ne ""))
|
||||
{
|
||||
open (SEND, "|/usr/lib/sendmail -t");
|
||||
print SEND "From: mail\@mathias.re\n";
|
||||
print SEND "To: mail\@mathias.re\n";
|
||||
print SEND "Subject: CSP Report\n\n";
|
||||
print SEND "$data\n";
|
||||
close (SEND);
|
||||
}
|
||||
|
||||
print $q->redirect('/');
|
Loading…
Reference in a new issue