From 7ba3cfa3af8f66cc0d586366d8917e00a6931cb3 Mon Sep 17 00:00:00 2001 From: Naeel Date: Mon, 27 Apr 2026 10:51:41 +0300 Subject: [PATCH] console: redirect root to console --- console/deploy/console.yaml | 7 +++++++ console/internal/api/server.go | 7 +++++++ console/ui/index.html | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/console/deploy/console.yaml b/console/deploy/console.yaml index 9db48d5..08fa1e6 100644 --- a/console/deploy/console.yaml +++ b/console/deploy/console.yaml @@ -119,6 +119,13 @@ spec: - host: fission.kube5s.ru http: paths: + - path: / + pathType: Exact + backend: + service: + name: fission-console + port: + number: 8090 - path: /console pathType: Prefix backend: diff --git a/console/internal/api/server.go b/console/internal/api/server.go index 6d73fe9..76501f8 100644 --- a/console/internal/api/server.go +++ b/console/internal/api/server.go @@ -104,6 +104,13 @@ func NewServer(cfg Config) *Server { // Разделено на публичные (без auth) и приватные (с authMiddleware). func (s *Server) RegisterRoutes(mux *http.ServeMux) { // Публичные: health checks, UI, auth endpoint + mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { + if r.URL.Path != "/" { + http.NotFound(w, r) + return + } + http.Redirect(w, r, "/console/", http.StatusTemporaryRedirect) + }) mux.HandleFunc("/health", func(w http.ResponseWriter, _ *http.Request) { w.Header().Set("Content-Type", "text/plain; charset=utf-8") _, _ = w.Write([]byte("ok\n")) diff --git a/console/ui/index.html b/console/ui/index.html index 9afb139..2e5560b 100644 --- a/console/ui/index.html +++ b/console/ui/index.html @@ -1236,7 +1236,7 @@ padding:8px 12px; cursor:pointer; background:#2a2a42; border-radius:8px 8px 0 0; user-select:none; "> - 💬 Ассистент + 💬 LLM Ассистент