simplified setup.nix
This commit is contained in:
@@ -58,13 +58,6 @@ let
|
|||||||
host: port:
|
host: port:
|
||||||
let
|
let
|
||||||
useLocalhost = host == config.networking.hostName;
|
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 = ''
|
localHeaders = ''
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
@@ -75,7 +68,11 @@ let
|
|||||||
// {
|
// {
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
${if useLocalhost then localHeaders else ""}
|
${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
|
in
|
||||||
|
|||||||
Reference in New Issue
Block a user