From 952f09844035200426d1b528b5c0fdc529ea1c19 Mon Sep 17 00:00:00 2001 From: Stian Thorgersen Date: Wed, 21 May 2014 11:16:27 +0100 Subject: [PATCH] KEYCLOAK-483 Remove 'index.html' from console url --- .../keycloak/services/resources/admin/AdminConsole.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/services/src/main/java/org/keycloak/services/resources/admin/AdminConsole.java b/services/src/main/java/org/keycloak/services/resources/admin/AdminConsole.java index bd897fa340..38bd390e77 100755 --- a/services/src/main/java/org/keycloak/services/resources/admin/AdminConsole.java +++ b/services/src/main/java/org/keycloak/services/resources/admin/AdminConsole.java @@ -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