simplified setup.nix
This commit is contained in:
parent
4f1fdab7a2
commit
2cf9361954
@ -58,13 +58,6 @@ let
|
||||
host: port:
|
||||
let
|
||||
useLocalhost = host == config.networking.hostName;
|
||||
headers = ''
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $http_connection;
|
||||
proxy_redirect off;
|
||||
proxy_http_version 1.1;
|
||||
'';
|
||||
localHeaders = ''
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
@ -75,7 +68,11 @@ let
|
||||
// {
|
||||
extraConfig = ''
|
||||
${if useLocalhost then localHeaders else ""}
|
||||
${headers}
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $http_connection;
|
||||
proxy_redirect off;
|
||||
proxy_http_version 1.1;
|
||||
'';
|
||||
};
|
||||
in
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user