summaryrefslogtreecommitdiffstats
path: root/roles/wiki
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2016-04-01 18:13:05 +0200
committerGuilhem Moulin <guilhem@fripost.org>2016-04-01 18:23:44 +0200
commit8164e87052cfa2d4a2929a1d095222614c12b95e (patch)
treea63bcd08b6cdb57d31c2fa4fad5930fe2058d838 /roles/wiki
parentd7ccaa19467cd4281989ac2f59ee2f20acbdc4e1 (diff)
Set a HPKP on the webmail, website/wiki/git and list manager.
Diffstat (limited to 'roles/wiki')
-rw-r--r--roles/wiki/files/etc/nginx/sites-available/website9
-rw-r--r--roles/wiki/files/etc/nginx/sites-available/wiki9
2 files changed, 10 insertions, 8 deletions
diff --git a/roles/wiki/files/etc/nginx/sites-available/website b/roles/wiki/files/etc/nginx/sites-available/website
index e372aa8..7886860 100644
--- a/roles/wiki/files/etc/nginx/sites-available/website
+++ b/roles/wiki/files/etc/nginx/sites-available/website
@@ -23,10 +23,6 @@ server {
server_name fripost.org;
server_name www.fripost.org;
- include snippets/ssl.conf;
- ssl_certificate /etc/nginx/ssl/www.fripost.org.pem;
- ssl_certificate_key /etc/nginx/ssl/www.fripost.org.key;
-
access_log /var/log/nginx/www.access.log;
error_log /var/log/nginx/www.error.log info;
@@ -34,6 +30,11 @@ server {
add_header Content-Security-Policy
"default-src 'none'; script-src 'self'; style-src 'self'; img-src 'self'; font-src 'self'; upgrade-insecure-requests; block-all-mixed-content; reflected-xss block; referrer no-referrer-when-downgrade; frame-ancestors 'none'; form-action 'none'; base-uri fripost.org www.fripost.org";
+ include snippets/ssl.conf;
+ ssl_certificate /etc/nginx/ssl/www.fripost.org.pem;
+ ssl_certificate_key /etc/nginx/ssl/www.fripost.org.key;
+ add_header Public-Key-Pins 'pin-sha256="fQ+gau72iwOf6rmXvY7/QemB+kYhixPCY/A/EIr3ats="; pin-sha256="MYhOgCyUOp8NRGxa1LZc57g0wREA3kV8C+4SsrDajt8="; max-age=15778800';
+
location / {
try_files $uri $uri/ =404;
index index.html;
diff --git a/roles/wiki/files/etc/nginx/sites-available/wiki b/roles/wiki/files/etc/nginx/sites-available/wiki
index bc44270..ba217a1 100644
--- a/roles/wiki/files/etc/nginx/sites-available/wiki
+++ b/roles/wiki/files/etc/nginx/sites-available/wiki
@@ -22,10 +22,6 @@ server {
server_name wiki.fripost.org;
- include snippets/ssl.conf;
- ssl_certificate /etc/nginx/ssl/www.fripost.org.pem;
- ssl_certificate_key /etc/nginx/ssl/www.fripost.org.key;
-
access_log /var/log/nginx/wiki.access.log;
error_log /var/log/nginx/wiki.error.log info;
@@ -33,6 +29,11 @@ server {
add_header Content-Security-Policy
"default-src 'none'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self'; font-src 'self'; upgrade-insecure-requests; block-all-mixed-content; reflected-xss block; referrer no-referrer-when-downgrade; frame-ancestors 'none'; form-action 'self'; base-uri wiki.fripost.org";
+ include snippets/ssl.conf;
+ ssl_certificate /etc/nginx/ssl/www.fripost.org.pem;
+ ssl_certificate_key /etc/nginx/ssl/www.fripost.org.key;
+ add_header Public-Key-Pins 'pin-sha256="fQ+gau72iwOf6rmXvY7/QemB+kYhixPCY/A/EIr3ats="; pin-sha256="MYhOgCyUOp8NRGxa1LZc57g0wREA3kV8C+4SsrDajt8="; max-age=15778800';
+
location / {
location ~ ^/website(/.*)?$ { return 302 $scheme://fripost.org$1; }
try_files $uri $uri/ =404;