Use recommendedProxySettings

This commit is contained in:
Oliver Davies 2025-04-28 02:07:10 +01:00
parent 0bba7ff4f8
commit 7a12a66266
4 changed files with 7 additions and 26 deletions

View file

@ -17,15 +17,7 @@ in
locations."/" = {
proxyPass = "http://localhost:${toString cfg.port}";
extraConfig = ''
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Protocol $scheme;
proxy_set_header X-Real-IP $remote_addr;
'';
recommendedProxySettings = true;
};
};
};

View file

@ -17,15 +17,9 @@
locations."/" = {
proxyPass = "http://localhost:${toString port}";
recommendedProxySettings = true;
extraConfig = ''
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Protocol $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_buffering off;
'';
};

View file

@ -23,15 +23,7 @@
locations."/" = {
proxyPass = "http://localhost:${toString cfg.port}";
extraConfig = ''
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Protocol $scheme;
proxy_set_header X-Real-IP $remote_addr;
'';
recommendedProxySettings = true;
};
};
};

View file

@ -19,7 +19,10 @@
forceSSL = true;
useACMEHost = "oliverdavies.uk";
locations."/".proxyPass = "http://localhost:${toString cfg.listenPort}";
locations."/" = {
proxyPass = "http://localhost:${toString cfg.listenPort}";
recommendedProxySettings = true;
};
};
};
}