KEYCLOAK-483

Remove 'index.html' from console url
This commit is contained in:
Stian Thorgersen 2014-05-21 11:16:27 +01:00
parent f08477ea66
commit 952f098440

View file

@ -250,9 +250,11 @@ public class AdminConsole {
@GET
public Response getMainPage() throws URISyntaxException {
return Response.status(302).location(
AdminRoot.adminConsoleUrl(uriInfo).path("index.html").build(realm.getName())
).build();
if (!uriInfo.getRequestUri().getPath().endsWith("/")) {
return Response.status(302).location(uriInfo.getRequestUriBuilder().path("/").build()).build();
} else {
return getResource("index.html");
}
}
@GET