From 582720c9d47ab1a6f0147ec6c563eb2874d75b42 Mon Sep 17 00:00:00 2001 From: mathias Date: Fri, 14 Dec 2018 20:40:15 +0200 Subject: [PATCH] Move to Netlify --- .htaccess | 84 ----------------------------------------------------- _config.yml | 4 +++ _headers | 25 ++++++++++++++++ _redirects | 4 +++ 4 files changed, 33 insertions(+), 84 deletions(-) delete mode 100644 .htaccess create mode 100644 _headers create mode 100644 _redirects diff --git a/.htaccess b/.htaccess deleted file mode 100644 index afaad68..0000000 --- a/.htaccess +++ /dev/null @@ -1,84 +0,0 @@ -RewriteBase / -RewriteEngine On - -AddDefaultCharset utf-8 -AddCharset UTF-8 .css .js .webmanifest -FileETag MTime Size -ServerSignature Off -SetEnvIf Host ^ suppress-error-charset - -AddType image/x-icon .ico -AddType application/manifest+json .webmanifest - -RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] -RewriteRule ^ https://%1%{REQUEST_URI} [R=301,L] -RewriteCond %{ENV:HTTPS} !=on -RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] -RewriteCond %{HTTP_HOST} ^flame.ga$ -RewriteRule ^ https://kaboom.pw/$1 [R=301,L] -RewriteCond %{HTTP_HOST} ^www.flame.ga$ -RewriteRule ^ https://kaboom.pw/$1 [R=301,L] - -ErrorDocument 404 https://kaboom.pw/ -RewriteCond %{REQUEST_FILENAME} -d -RewriteRule . - [R=404] - - -Header set Content-Security-Policy "default-src 'none'; font-src data:; img-src 'self'; manifest-src 'self'; style-src 'unsafe-inline'; upgrade-insecure-requests" -Header set X-Frame-Options "DENY" -Header set X-Xss-Protection "1; mode=block" - - -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 unset Accept-Ranges -Header unset Last-Modified - -RewriteCond %{HTTP:Accept-Encoding} br -RewriteCond %{REQUEST_FILENAME}.br -f -RewriteRule ^(.*)$ $1.br [L] - -RewriteCond %{HTTP:Accept-Encoding} gzip -RewriteCond %{REQUEST_FILENAME}.gz -f -RewriteRule ^(.*)$ $1.gz [L] - -AddEncoding br .br -AddEncoding gzip .gz - - -ForceType "text/css; charset=utf-8" - - - -ForceType image/x-icon - - - -ForceType "text/html; charset=utf-8" - - - -ForceType "text/javascript; charset=utf-8" - - - -ForceType "image/png; charset=utf-8" - - - -ForceType "image/svg+xml; charset=utf-8" - - - -ForceType "text/plain; charset=utf-8" - - - -ForceType "application/manifest+json; charset=utf-8" - - - -ForceType "text/xml; charset=utf-8" - diff --git a/_config.yml b/_config.yml index 1c9a53f..c4a57d1 100644 --- a/_config.yml +++ b/_config.yml @@ -2,6 +2,10 @@ title: Kaboom description: Kaboom is a multiplayer server for Minecraft that combines free OP with anarchy. Do anything you want, without having to worry about rules. url: https://kaboom.pw +include: + - _headers + - _redirects + exclude: - build.sh - Gemfile diff --git a/_headers b/_headers new file mode 100644 index 0000000..c891f34 --- /dev/null +++ b/_headers @@ -0,0 +1,25 @@ +/ + Content-Security-Policy: default-src 'none'; font-src data:; img-src 'self'; manifest-src 'self'; style-src 'unsafe-inline'; upgrade-insecure-requests + Feature-Policy: accelerometer 'none'; ambient-light-sensor 'none'; autoplay 'none'; camera 'none'; encrypted-media 'none'; fullscreen 'none'; geolocation 'none'; gyroscope 'none'; magnetometer 'none'; microphone 'none'; midi 'none'; payment 'none'; speaker 'none'; sync-xhr 'none'; usb 'none'; vr 'none' + X-Frame-Options: DENY + X-Xss-Protection: 1; mode=block + +/* + Referrer-Policy: no-referrer + Strict-Transport-Security: max-age=63072000; includeSubdomains; preload + X-Content-Type-Options: nosniff + +/*.ico + Content-Type: image/x-icon + +/*.png + Content-Type: image/png; charset=utf-8 + +/*.svg + Content-Type: image/svg+xml; charset=utf-8 + +/*.webmanifest + Content-Type: application/manifest+json; charset=utf-8 + +/*.xml + Content-Type: text/xml; charset=utf-8 diff --git a/_redirects b/_redirects new file mode 100644 index 0000000..d87c7ee --- /dev/null +++ b/_redirects @@ -0,0 +1,4 @@ +https://kaboom.netlify.com/* https://kaboom.pw/:splat 301! +http://kaboom.pw/* https://kaboom.pw/:splat 301! +http://www.kaboom.pw/* https://kaboom.pw/:splat 301! +https://kaboom.pw/* /index 404