refactor(nginx): proxied xvars defaults

This commit is contained in:
arcnmx 2024-06-24 11:40:44 -07:00
parent b5c1b9de84
commit 1d19f0821d
3 changed files with 70 additions and 30 deletions

View file

@ -374,12 +374,12 @@ let
in {
xvars = {
parseReferer = mkIf (anyLocations needsReferer) true;
defaults = mkIf (anyLocations (loc: loc.proxy.enabled)) (mkOptionDefault (mapOptionDefaults rec {
defaults = mkIf (anyLocations (loc: loc.proxy.enabled)) (mapOptionDefaults rec {
proxy_scheme = null;
proxy_host = "$proxy_host";
proxy_port = "$proxy_port";
proxy_hostport = "${proxy_host}:${proxy_port}";
}));
});
};
proxy = mkIf (cfg.copyFromVhost != null) confCopy;
};