Add Nginx config files to repo

Allows us to edit redirects and headers locally.
This commit is contained in:
Jonah 2019-08-11 22:12:19 -05:00
parent 98bca69952
commit 7daa208815
No known key found for this signature in database
GPG Key ID: B9D1C611859E0649
6 changed files with 25 additions and 6 deletions

3
.github/CODEOWNERS vendored
View File

@ -1,9 +1,10 @@
# Administration Related Files
/.well-known/ @JonahAragon
/nginx/ @JonahAragon
/404.html @JonahAragon
/.github/ @JonahAragon @BurungHantu1605
/LICENSE.txt @JonahAragon @BurungHantu1605
/.travis.yml @Shifterovich
/.travis.yml @JonahAragon @Shifterovich
/CNAME @JonahAragon
# Editorial Team

View File

@ -5,7 +5,6 @@ sass:
style: compressed
plugins:
- jekyll-sitemap
- jekyll-redirect-from
sitemap:
file: "/sitemap.xml"
include: [".well-known"]

2
nginx/000-includes.conf Normal file
View File

@ -0,0 +1,2 @@
include /var/www/privacytools.io/nginx/010-headers.conf;
include /var/www/privacytools.io/nginx/020-redirects.conf;

9
nginx/010-headers.conf Normal file
View File

@ -0,0 +1,9 @@
add_header X-Frame-Options DENY always;
add_header X-XSS-Protection "1; mode=block" always;
add_header X-Content-Type-Options nosniff always;
add_header Content-Security-Policy "default-src 'none'; script-src 'self' 'unsafe-inline' https://stats.privacytools.io; style-src 'self' 'unsafe-inline'; img-src 'self' data: https://*.privacytools.io; object-src 'none'; frame-src https://stats.privacytools.io; font-src 'self'; manifest-src 'self';" always;
add_header Strict-Transport-Security "max-age=31557600; includeSubDomains; preload";
add_header 'Access-Control-Allow-Origin' '*';
add_header Alt-Svc 'h2="privacy2zbidut4m4jyj3ksdqidzkw3uoip2vhvhbvwxbqux5xy5obyd.onion:443"; ma=86400; persist=1';
add_header Expect-CT 'max-age=0; report-uri="https://34f7a2cb34f91bc092b2e15f4e4bda78.report-uri.com/r/d/ct/reportOnly"';
add_header Referrer-Policy "strict-origin";

12
nginx/020-redirects.conf Normal file
View File

@ -0,0 +1,12 @@
location = /old/ {
return 301 /classic/;
}
location = /software/im/ {
return 301 /software/real-time-communication/;
}
location = /software/voip/ {
return 301 /software/real-time-communication/;
}
location = /software/teamchat/ {
return 301 /software/real-time-communication/;
}

View File

@ -1,10 +1,6 @@
---
layout: page
permalink: /software/real-time-communication/
redirect_from:
- /software/im/
- /software/voip/
- /software/teamchat/
title: "Real-Time Communication"
description: "Discover secure and private ways to communicate with others online without letting any third parties read your messages."
---