aboutsummaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorAdam Mathes <adam@adammathes.com>2026-02-15 21:58:27 -0800
committerAdam Mathes <adam@adammathes.com>2026-02-15 21:58:27 -0800
commit7196992916b42fe6180c0d05331716c52fac79b0 (patch)
treee321df891b7bffe09eba698f1d1c091a2b546c8d /web
parent174987660473d4cdc1ad6857e5513a69f265f614 (diff)
downloadneko-7196992916b42fe6180c0d05331716c52fac79b0.tar.gz
neko-7196992916b42fe6180c0d05331716c52fac79b0.tar.bz2
neko-7196992916b42fe6180c0d05331716c52fac79b0.zip
Web: Make vanilla (v3) frontend the default at root, move react (v2) to /v2/
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)))))