2023-08-31 01:55:45 +03:00
|
|
|
{ depot, ... }:
|
|
|
|
with depot.lib.nginx.vhosts;
|
2021-10-16 21:24:30 +03:00
|
|
|
let
|
2023-08-31 01:55:45 +03:00
|
|
|
inherit (depot.lib.meta) domain;
|
2021-10-16 21:24:30 +03:00
|
|
|
front = "ident.${domain}";
|
2023-08-31 01:55:45 +03:00
|
|
|
back = depot.lib.identity.ldap.server.hostname;
|
2021-10-16 21:24:30 +03:00
|
|
|
in
|
|
|
|
{
|
2022-03-13 00:16:38 +02:00
|
|
|
services.nginx.virtualHosts."${front}" = basic // {
|
2021-10-16 21:24:30 +03:00
|
|
|
locations."= /".return = "302 /ipa/ui/";
|
|
|
|
locations."/" = {
|
|
|
|
# HACK: not using proxy_pass here to prevent inclusion of recommended headers
|
|
|
|
extraConfig = ''
|
|
|
|
proxy_pass https://10.10.0.11;
|
|
|
|
proxy_set_header Host ${back};
|
|
|
|
proxy_set_header Referer https://${back}/ipa/ui/;
|
|
|
|
proxy_cookie_domain ${back} ${front};
|
|
|
|
add_header Referer https://${front}/ipa/ui/;
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|