fix nginx

This commit is contained in:
2023-08-26 00:12:15 +08:00
parent 43c6ac6448
commit 773cfb5e99

View File

@@ -73,6 +73,10 @@ inputs:
(header: "proxy_set_header ${header.name} ${header.value};")
(attrsToList site.value.setHeaders))
++ (if site.value.detectAuth then ["proxy_hide_header Authorization;"] else [])
++ (
if site.value.addAuth then
["include ${inputs.config.sops.templates."nginx/addAuth/${site.name}-template".path};"]
else [])
);
}
// (
@@ -82,12 +86,6 @@ inputs:
basicAuthFile = inputs.config.sops.secrets."nginx/detectAuth/${site.name}".path;
}
else {}
)
// (
if site.value.addAuth then
let config = inputs.config.sops.templates."nginx/addAuth/${site.name}-template".path;
in { extraConfig = "include ${config};"; }
else {}
);
addSSL = true;
forceSSL = site.value.rewriteHttps;