From 7196992916b42fe6180c0d05331716c52fac79b0 Mon Sep 17 00:00:00 2001 From: Adam Mathes Date: Sun, 15 Feb 2026 21:58:27 -0800 Subject: Web: Make vanilla (v3) frontend the default at root, move react (v2) to /v2/ --- web/web.go | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'web') diff --git a/web/web.go b/web/web.go index bb00773..a287bb9 100644 --- a/web/web.go +++ b/web/web.go @@ -223,15 +223,14 @@ func NewRouter(cfg *config.Settings) http.Handler { staticSub, _ := fs.Sub(staticFiles, "static") mux.Handle("/static/", GzipMiddleware(http.StripPrefix("/static/", http.FileServer(http.FS(staticSub))))) - // New Frontend (React/Vite) from web/dist/v2 - // Default route - mux.Handle("/", GzipMiddleware(ServeFrontend("dist/v2"))) - // Also keep /v2/ for explicit access - mux.Handle("/v2/", GzipMiddleware(http.StripPrefix("/v2/", ServeFrontend("dist/v2")))) - - // Vanilla JS (v3) + // Default route: Vanilla JS (v3) + mux.Handle("/", GzipMiddleware(ServeFrontend("dist/v3"))) + // Access v3 explicitly mux.Handle("/v3/", GzipMiddleware(http.StripPrefix("/v3/", ServeFrontend("dist/v3")))) + // React Frontend (v2) at /v2/ + mux.Handle("/v2/", GzipMiddleware(http.StripPrefix("/v2/", ServeFrontend("dist/v2")))) + // Legacy UI at /v1/ mux.Handle("/v1/", GzipMiddleware(http.StripPrefix("/v1/", AuthWrap(http.HandlerFunc(indexHandler))))) -- cgit v1.2.3