Skip to content

Commit a7a55f8

Browse files
committed
login page configurable per domain
1 parent dc01edd commit a7a55f8

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

nix/nixos-module.nix

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,15 @@ in
103103
Paths to protect with the accessList authentication.
104104
'';
105105
};
106+
107+
loginPage = lib.mkOption {
108+
type = lib.types.str;
109+
default = cfg.nginxConfig.subpath;
110+
example = "/xnode-monetization";
111+
description = ''
112+
The subpath to redirect unauthenticated users to.
113+
'';
114+
};
106115
};
107116
}
108117
);
@@ -278,15 +287,6 @@ in
278287
The subpath used for xnode-auth endpoints.
279288
'';
280289
};
281-
282-
loginPage = lib.mkOption {
283-
type = lib.types.str;
284-
default = "/xnode-auth";
285-
example = "/xnode-monetization";
286-
description = ''
287-
The subpath to redirect unauthenticated users to.
288-
'';
289-
};
290290
};
291291
};
292292
};
@@ -406,7 +406,7 @@ in
406406
'';
407407
};
408408
"@login" = {
409-
return = "302 $scheme://$host${cfg.nginxConfig.loginPage}?redirect=$scheme://$host$request_uri&rejected=$auth_resp_xnode_auth_deny_reason";
409+
return = "302 $scheme://$host${access.loginPage}?redirect=$scheme://$host$request_uri&rejected=$auth_resp_xnode_auth_deny_reason";
410410
};
411411
}
412412
];

0 commit comments

Comments
 (0)