Skip to content

Commit

Permalink
Fix login error : More than 1 route matched the incoming request.
Browse files Browse the repository at this point in the history
close #60
  • Loading branch information
tchiotludo committed May 14, 2019
1 parent f47cec0 commit 266d120
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/java/org/kafkahq/controllers/LoginController.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> failed) {
return HttpResponse
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
}
Expand Down

0 comments on commit 266d120

Please sign in to comment.