Move to Netlify

This commit is contained in:
mathias 2018-12-14 20:40:15 +02:00
parent b9dc73f095
commit 582720c9d4
4 changed files with 33 additions and 84 deletions

View file

@ -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]
<FilesMatch ".(htm|html)$">
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"
</FilesMatch>
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
<FilesMatch (.css.br|.css.gz)>
ForceType "text/css; charset=utf-8"
</FilesMatch>
<FilesMatch (.ico.br|.ico.gz)>
ForceType image/x-icon
</FilesMatch>
<FilesMatch (.html.br|.html.gz)>
ForceType "text/html; charset=utf-8"
</FilesMatch>
<FilesMatch (.js.br|.js.gz)>
ForceType "text/javascript; charset=utf-8"
</FilesMatch>
<FilesMatch (.png.br|.png.gz)>
ForceType "image/png; charset=utf-8"
</FilesMatch>
<FilesMatch (.svg.br|.svg.gz)>
ForceType "image/svg+xml; charset=utf-8"
</FilesMatch>
<FilesMatch (.txt.br|.txt.gz)>
ForceType "text/plain; charset=utf-8"
</FilesMatch>
<FilesMatch (.webmanifest.br|.webmanifest.gz)>
ForceType "application/manifest+json; charset=utf-8"
</FilesMatch>
<FilesMatch (.xml.br|.xml.gz)>
ForceType "text/xml; charset=utf-8"
</FilesMatch>

View file

@ -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. 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 url: https://kaboom.pw
include:
- _headers
- _redirects
exclude: exclude:
- build.sh - build.sh
- Gemfile - Gemfile

25
_headers Normal file
View file

@ -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

4
_redirects Normal file
View file

@ -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