diff --git a/src/main/java/org/kafkahq/controllers/LoginController.java b/src/main/java/org/kafkahq/controllers/LoginController.java index 0d7654816..d0c5e4859 100644 --- a/src/main/java/org/kafkahq/controllers/LoginController.java +++ b/src/main/java/org/kafkahq/controllers/LoginController.java @@ -16,7 +16,7 @@ @Requires(property = SecurityConfigurationProperties.PREFIX + ".enabled", value = StringUtils.TRUE) @Controller public class LoginController extends AbstractController { - @Get("${kafkahq.server.base-path:}/login{/failed:[a-zA-Z]+}") + @Get("${kafkahq.server.base-path:}/login/{failed:[a-zA-Z]+}") @View("login") public HttpResponse login(Optional failed) { return HttpResponse diff --git a/src/main/java/org/kafkahq/controllers/RedirectController.java b/src/main/java/org/kafkahq/controllers/RedirectController.java index 23f9335e0..e23d74cf8 100644 --- a/src/main/java/org/kafkahq/controllers/RedirectController.java +++ b/src/main/java/org/kafkahq/controllers/RedirectController.java @@ -30,7 +30,7 @@ public HttpResponse home() throws URISyntaxException { return HttpResponse.redirect(this.uri("/" + kafkaModule.getClustersList().get(0) + "/topic")); } - @Get("${kafkahq.server.base-path:}/{cluster}") + @Get("${kafkahq.server.base-path:}/{cluster:(?!login)[^/]+}") public HttpResponse topic(String cluster) throws URISyntaxException { return HttpResponse.redirect(this.uri("/" + cluster + "/topic")); }