Skip to content
Snippets Groups Projects
Commit 5bb81eac authored by nimrod's avatar nimrod
Browse files

Upgrade-Insecure-Requests on www.shore.co.il.

Redirect to https only if the client asked.
parent b7cf9944
No related branches found
No related tags found
No related merge requests found
Pipeline #1196 failed
...@@ -6,12 +6,26 @@ server { ...@@ -6,12 +6,26 @@ server {
include snippets/ads-txt.conf; include snippets/ads-txt.conf;
include snippets/security-txt.conf; include snippets/security-txt.conf;
include snippets/www-acme-challenge.conf; include snippets/www-acme-challenge.conf;
location = / { return 301 https://$host/blog/; } location = $request_uri { include snipptes/upgrade-secure.conf; }
location /repo/ {
root /var/www/www.shore.co.il/; root /var/www/www.shore.co.il/;
autoindex on; error_page 404 /;
location /repo/ { autoindex on; }
location = /resume { try_files $uri /resume/resume.html; }
location = /resume/ { index resume.html; }
location = / { return 301 $scheme://$host/blog/; }
location /about { return 301 $scheme://$host/blog/pages/about-me.html; }
location /spam { return 301 $scheme://$host/blog/pages/spam.html; }
location = /blog {
try_files $uri /blog/index.html;
charset UTF-8;
} }
include snippets/redirect-https.conf;
location /cgit { return 301 https://git.shore.co.il/explore; }
location /cgit/ { return 301 https://git.shore.co.il/explore; }
location /git { return 301 https://git.shore.co.il/explore; }
location /git/ { return 301 https://git.shore.co.il/explore; }
} }
server { server {
...@@ -29,9 +43,9 @@ server { ...@@ -29,9 +43,9 @@ server {
location = /resume { try_files $uri /resume/resume.html; } location = /resume { try_files $uri /resume/resume.html; }
location = /resume/ { index resume.html; } location = /resume/ { index resume.html; }
location = / { return 301 https://$host/blog/; } location = / { return 301 $scheme://$host/blog/; }
location /about { return 301 https://$host/blog/pages/about-me.html; } location /about { return 301 $scheme://$host/blog/pages/about-me.html; }
location /spam { return 301 https://$host/blog/pages/spam.html; } location /spam { return 301 $scheme://$host/blog/pages/spam.html; }
location = /blog { location = /blog {
try_files $uri /blog/index.html; try_files $uri /blog/index.html;
charset UTF-8; charset UTF-8;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment