aboutsummaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/web.go13
1 files changed, 6 insertions, 7 deletions
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)))))