Move set x-auth-username to locations
This commit is contained in:
@@ -47,10 +47,14 @@
|
||||
};
|
||||
options.services.nginx.virtualHosts = lib.mkOption {
|
||||
type = lib.types.attrsOf (lib.types.submodule ({ config, ...}: {
|
||||
options.locations = lib.types.attrsOf (lib.types.submodule {
|
||||
extraConfig = lib.mkIf config.sso.enable ''
|
||||
proxy_set_header X-Auth-Username $auth_resp_username
|
||||
'';
|
||||
})
|
||||
options.sso.enable = lib.mkEnableOption "SSO BSN";
|
||||
config.extraConfig = lib.mkIf config.sso.enable ''
|
||||
auth_request /__auth_sso_validate;
|
||||
proxy_set_header X-Auth-Username $auth_resp_username;
|
||||
|
||||
location = /__auth_sso_validate {
|
||||
internal;
|
||||
|
||||
Reference in New Issue
Block a user