Преглед на файлове

Use chameth.com as the canonical url and redirect all other requests

master
Chris Smith преди 4 години
родител
ревизия
7a55a22cee
Signed by: Chris Smith <chris@chameth.com> GPG Key ID: 3A2D4BBDC4A3C9A9
променени са 2 файла, в които са добавени 9 реда и са изтрити 5 реда
  1. 8
    4
      nginx.conf
  2. 1
    1
      site/config.yaml

+ 8
- 4
nginx.conf Целия файл

@@ -33,7 +33,7 @@ http {
33 33
     server_tokens off;
34 34
 
35 35
     add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;
36
-    add_header Content-Security-Policy "require-sri-for script; default-src 'none'; script-src 'self' 'sha384-m2EXauJIeXunnu9rWV0uaFjwoSeSA+jEbAKdI5sQaGiiiOwht/hOVB/8lq2JI8Bd'; img-src 'self' https://photos.chameth.com https://a.c5h.io; style-src 'self'; font-src 'self'; frame-ancestors 'none'; frame-src https://contact.chameth.com; form-action 'none'; base-uri 'none';";
36
+    add_header Content-Security-Policy "require-sri-for script; default-src 'none'; img-src 'self' https://photos.chameth.com https://a.c5h.io; style-src 'self'; font-src 'self'; frame-ancestors 'none'; frame-src https://contact.chameth.com; form-action 'none'; base-uri 'none';";
37 37
     add_header X-Frame-Options "SAMEORIGIN";
38 38
     add_header X-Content-Type-Options "nosniff";
39 39
     add_header X-XSS-Protection "1; mode=block";
@@ -52,7 +52,7 @@ http {
52 52
 
53 53
     server {
54 54
         listen       80;
55
-        server_name  localhost;
55
+        server_name  chameth.com localhost;
56 56
 
57 57
         location / {
58 58
             root   /usr/share/nginx/html;
@@ -68,12 +68,16 @@ http {
68 68
             }
69 69
         }
70 70
 
71
-        #error_page  404              /404.html;
72
-
73 71
         error_page   500 502 503 504  /50x.html;
74 72
         location = /50x.html {
75 73
             root   /usr/share/nginx/html;
76 74
         }
77 75
     }
78 76
 
77
+    server {
78
+        server_name _;
79
+        listen 80 default_server;
80
+        return 301 https://chameth.com$request_uri;
81
+    }
82
+
79 83
 }

+ 1
- 1
site/config.yaml Целия файл

@@ -1,4 +1,4 @@
1
-baseurl: https://www.chameth.com
1
+baseUrl: https://chameth.com
2 2
 assetDir: assets
3 3
 disablePathToLower: true
4 4
 languageCode: en-gb

Loading…
Отказ
Запис