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,10 +33,34 @@ in {
nginx.virtualHosts.${domain} = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://localhost:${
toString config.services.keycloak.settings.http-port
}";
locations = {
"/" = { return = "301 https://${domain}/realms/master/account"; };
"/js" = {
proxyPass = "http://localhost:${
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
}";
};
};
};
};