console: redirect root to console
This commit is contained in:
@@ -119,6 +119,13 @@ spec:
|
|||||||
- host: fission.kube5s.ru
|
- host: fission.kube5s.ru
|
||||||
http:
|
http:
|
||||||
paths:
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Exact
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: fission-console
|
||||||
|
port:
|
||||||
|
number: 8090
|
||||||
- path: /console
|
- path: /console
|
||||||
pathType: Prefix
|
pathType: Prefix
|
||||||
backend:
|
backend:
|
||||||
|
|||||||
@@ -104,6 +104,13 @@ func NewServer(cfg Config) *Server {
|
|||||||
// Разделено на публичные (без auth) и приватные (с authMiddleware).
|
// Разделено на публичные (без auth) и приватные (с authMiddleware).
|
||||||
func (s *Server) RegisterRoutes(mux *http.ServeMux) {
|
func (s *Server) RegisterRoutes(mux *http.ServeMux) {
|
||||||
// Публичные: health checks, UI, auth endpoint
|
// Публичные: 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) {
|
mux.HandleFunc("/health", func(w http.ResponseWriter, _ *http.Request) {
|
||||||
w.Header().Set("Content-Type", "text/plain; charset=utf-8")
|
w.Header().Set("Content-Type", "text/plain; charset=utf-8")
|
||||||
_, _ = w.Write([]byte("ok\n"))
|
_, _ = w.Write([]byte("ok\n"))
|
||||||
|
|||||||
@@ -1236,7 +1236,7 @@
|
|||||||
padding:8px 12px; cursor:pointer; background:#2a2a42; border-radius:8px 8px 0 0;
|
padding:8px 12px; cursor:pointer; background:#2a2a42; border-radius:8px 8px 0 0;
|
||||||
user-select:none;
|
user-select:none;
|
||||||
">
|
">
|
||||||
<span style="font-weight:600; font-size:.85rem;">💬 Ассистент</span>
|
<span style="font-weight:600; font-size:.85rem;">💬 LLM Ассистент</span>
|
||||||
<span id="assistant-toggle-icon" style="font-size:.75rem; opacity:.7;">▲</span>
|
<span id="assistant-toggle-icon" style="font-size:.75rem; opacity:.7;">▲</span>
|
||||||
</div>
|
</div>
|
||||||
<div id="assistant-body" style="padding:10px; display:flex; flex-direction:column; gap:8px;">
|
<div id="assistant-body" style="padding:10px; display:flex; flex-direction:column; gap:8px;">
|
||||||
|
|||||||
Reference in New Issue
Block a user