From a6dda75e6d7033f9a04aa94c84b61c1c89b3bae8 Mon Sep 17 00:00:00 2001 From: Cheng Pan Date: Tue, 24 Oct 2023 22:09:24 +0800 Subject: [PATCH] nit --- .../org/apache/kyuubi/server/KyuubiRestFrontendService.scala | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kyuubi-server/src/main/scala/org/apache/kyuubi/server/KyuubiRestFrontendService.scala b/kyuubi-server/src/main/scala/org/apache/kyuubi/server/KyuubiRestFrontendService.scala index af29367f78f..c5d44213c90 100644 --- a/kyuubi-server/src/main/scala/org/apache/kyuubi/server/KyuubiRestFrontendService.scala +++ b/kyuubi-server/src/main/scala/org/apache/kyuubi/server/KyuubiRestFrontendService.scala @@ -102,6 +102,9 @@ class KyuubiRestFrontendService(override val serverable: Serverable) } private def installWebUI(): Unit = { + // redirect root path to Web UI home page + server.addRedirectHandler("/", "/ui") + val servletHandler = JettyUtils.createStaticHandler("dist", "/ui") // HTML5 Web History Mode requires redirect any url path under Web UI Servlet to the main page. // See more details at https://router.vuejs.org/guide/essentials/history-mode.html#html5-mode @@ -109,8 +112,6 @@ class KyuubiRestFrontendService(override val serverable: Serverable) errorHandler.addErrorPage(404, "/") servletHandler.setErrorHandler(errorHandler) server.addHandler(servletHandler) - // The legacy Web UI under "/", redirect it to new UI for convenient - server.addRedirectHandler("/", "/ui") } private def startBatchChecker(): Unit = {