From 3e1e5ae209345789831024f082bc185d9c349fe7 Mon Sep 17 00:00:00 2001 From: yxm-coding <71698303+yxm-coding@users.noreply.github.com> Date: Fri, 27 Dec 2024 15:35:50 +0800 Subject: [PATCH] fix(launchers): update addViewController to correctly redirect to the front-end page when accessing the domain while logged in (#1981) --- .../src/main/java/com/tencent/supersonic/web/WebConfig.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/launchers/common/src/main/java/com/tencent/supersonic/web/WebConfig.java b/launchers/common/src/main/java/com/tencent/supersonic/web/WebConfig.java index 18a0d6b68..1aa538d41 100644 --- a/launchers/common/src/main/java/com/tencent/supersonic/web/WebConfig.java +++ b/launchers/common/src/main/java/com/tencent/supersonic/web/WebConfig.java @@ -17,6 +17,7 @@ public class WebConfig implements WebMvcConfigurer { @Override public void addViewControllers(ViewControllerRegistry registry) { - registry.addViewController("/").setViewName("forward:/webapp/index.html"); + registry.addViewController("/").setViewName("redirect:/webapp/"); + registry.addViewController("/webapp/").setViewName("forward:/webapp/index.html"); } }