mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 04:19:19 -08:00
fix(nginx): hide headers.set from proxy responses
This commit is contained in:
parent
cbcb73e93b
commit
e4bbddb004
1 changed files with 2 additions and 1 deletions
|
|
@ -10,7 +10,7 @@ let
|
|||
inherit (gensokyo-zone.lib) mapOptionDefaults;
|
||||
inherit (lib.options) mkOption;
|
||||
inherit (lib.modules) mkIf mkMerge mkAfter mkOptionDefault;
|
||||
inherit (lib.attrsets) mapAttrsToList;
|
||||
inherit (lib.attrsets) mapAttrsToList mapAttrs;
|
||||
inherit (lib.lists) isList;
|
||||
cfg = config.headers;
|
||||
in {
|
||||
|
|
@ -36,6 +36,7 @@ let
|
|||
(mkIf cfg.inheritServerDefaults (mapOptionDefaults virtualHost.headers.set))
|
||||
];
|
||||
};
|
||||
proxy.headers.hide = mkIf (cfg.set != {}) (mapAttrs (_: value: mkOptionDefault (value != null)) cfg.set);
|
||||
extraConfig = mkMerge setHeaders;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue