keycloak: Only expose recommended endpoints. Redirect main page to account page.

This commit is contained in:
Giulio De Pasquale 2022-10-28 15:24:23 +02:00
parent 9180f31c3c
commit 60546992b2

View File

@ -33,11 +33,35 @@ in {
nginx.virtualHosts.${domain} = { nginx.virtualHosts.${domain} = {
forceSSL = true; forceSSL = true;
enableACME = true; enableACME = true;
locations."/" = {
locations = {
"/" = { return = "301 https://${domain}/realms/master/account"; };
"/js" = {
proxyPass = "http://localhost:${ proxyPass = "http://localhost:${
toString config.services.keycloak.settings.http-port toString config.services.keycloak.settings.http-port
}"; }";
}; };
"/realms" = {
proxyPass = "http://localhost:${
toString config.services.keycloak.settings.http-port
}";
};
"/resources" = {
proxyPass = "http://localhost:${
toString config.services.keycloak.settings.http-port
}";
};
"/robots.txt" = {
proxyPass = "http://localhost:${
toString config.services.keycloak.settings.http-port
}";
};
};
}; };
}; };