1
Fork 0
mirror of https://github.com/thegeneralist01/config.git synced 2026-03-07 10:59:55 +01:00

site: fix redirect issues

This commit is contained in:
TheGeneralist 2026-01-25 15:57:04 +01:00
parent 4826f1fe64
commit 41d3da9bb3
Signed by: thegeneralist01
SSH key fingerprint: SHA256:pp9qddbCNmVNoSjevdvQvM5z0DHN7LTa8qBMbcMq/R4

View file

@ -56,12 +56,10 @@ in
virtualHosts."${family_domain}" = { virtualHosts."${family_domain}" = {
root = "/var/www/${family_domain}/dist"; root = "/var/www/${family_domain}/dist";
locations."/".tryFiles = "$uri $uri.html $uri/ $uri/index.html =404"; locations."/".tryFiles = "$uri $uri/index.html $uri.html =404";
extraConfig = '' extraConfig = ''
if ($http_x_forwarded_proto = "http") { absolute_redirect off;
return 301 https://${family_domain}$request_uri;
}
location ~* \.(html|css|js|jpg|jpeg|png|gif|svg|ico|woff2?)$ { location ~* \.(html|css|js|jpg|jpeg|png|gif|svg|ico|woff2?)$ {
expires 1d; expires 1d;