fix indents
This commit is contained in:
parent
5f5668de5f
commit
5ebf2754c2
1 changed files with 30 additions and 30 deletions
|
|
@ -34,35 +34,35 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
recommendedProxySettings = true;
|
recommendedProxySettings = true;
|
||||||
recommendedTlsSettings = true;
|
recommendedTlsSettings = true;
|
||||||
virtualHosts = {
|
virtualHosts = {
|
||||||
"_" = {
|
"_" = {
|
||||||
default = true;
|
default = true;
|
||||||
forceSSL = true;
|
|
||||||
useACMEHost = base;
|
|
||||||
locations."/".return = "404";
|
|
||||||
};
|
|
||||||
} // lib.mapAttrs' (subdomain: cfg: lib.nameValuePair (if subdomain == "@" then base else "${subdomain}.${base}") {
|
|
||||||
useACMEHost = base;
|
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
|
useACMEHost = base;
|
||||||
|
locations."/".return = "404";
|
||||||
|
};
|
||||||
|
} // lib.mapAttrs' (subdomain: cfg: lib.nameValuePair (if subdomain == "@" then base else "${subdomain}.${base}") {
|
||||||
|
useACMEHost = base;
|
||||||
|
forceSSL = true;
|
||||||
|
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = cfg.dest;
|
proxyPass = cfg.dest;
|
||||||
proxyWebsockets = true;
|
proxyWebsockets = true;
|
||||||
basicAuthFile = if cfg.auth then "/var/lib/nginx/.htpasswd" else null;
|
basicAuthFile = if cfg.auth then "/var/lib/nginx/.htpasswd" else null;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
proxy_set_header X-Auth-User $remote_user;
|
proxy_set_header X-Auth-User $remote_user;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
client_max_body_size 50000M;
|
client_max_body_size 50000M;
|
||||||
proxy_read_timeout 600s;
|
proxy_read_timeout 600s;
|
||||||
proxy_send_timeout 600s;
|
proxy_send_timeout 600s;
|
||||||
send_timeout 600s;
|
send_timeout 600s;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}) proxy-mappings;
|
}) proxy-mappings;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue