mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-12 04:39:23 +08:00
fix nginx
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user