From 3c7a2a675282cde06ca6c99c289f3a8b9a454aa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Ko=CC=88ninger?= Date: Fri, 29 Nov 2024 09:02:53 +0100 Subject: [PATCH] fix(#3829): error 404 is shown when // is opened in browser --- .../server/ui/config/AdminServerUiAutoConfiguration.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spring-boot-admin-server-ui/src/main/java/de/codecentric/boot/admin/server/ui/config/AdminServerUiAutoConfiguration.java b/spring-boot-admin-server-ui/src/main/java/de/codecentric/boot/admin/server/ui/config/AdminServerUiAutoConfiguration.java index 80f8ef5612d..ba26a6d3371 100644 --- a/spring-boot-admin-server-ui/src/main/java/de/codecentric/boot/admin/server/ui/config/AdminServerUiAutoConfiguration.java +++ b/spring-boot-admin-server-ui/src/main/java/de/codecentric/boot/admin/server/ui/config/AdminServerUiAutoConfiguration.java @@ -258,9 +258,11 @@ public HomepageForwardingFilterConfig homepageForwardingFilterConfig() throws IO List extensionRoutes = new UiRoutesScanner(this.applicationContext) .scan(this.adminUi.getExtensionResourceLocations()); - List routesIncludes = Stream.concat(DEFAULT_UI_ROUTES.stream(), extensionRoutes.stream()) + List routesIncludes = Stream + .concat(DEFAULT_UI_ROUTES.stream(), Stream.concat(extensionRoutes.stream(), Stream.of("/"))) .map(this.adminServer::path) .collect(Collectors.toList()); + List routesExcludes = Stream .concat(DEFAULT_UI_ROUTE_EXCLUDES.stream(), this.adminUi.getAdditionalRouteExcludes().stream()) .map(this.adminServer::path)