pull-through dist server

This commit is contained in:
Mikaël Cluseau
2025-07-08 22:20:26 +02:00
parent 08cbccc756
commit 899a0a9dab
7 changed files with 28 additions and 12 deletions

View File

@ -72,7 +72,7 @@ func main() {
staticHandler := http.FileServer(http.FS(dlshtml.FS))
http.Handle("/favicon.ico", staticHandler)
http.Handle("/ui/", staticHandler)
http.Handle("/dist/", http.StripPrefix("/dist/", http.FileServer(http.Dir(*dataDir+"/dist"))))
http.Handle("/dist/", http.StripPrefix("/dist/", upstreamServer{}))
http.Handle("/public-state", streamsse.StreamHandler(wPublicState))
http.Handle("/state", requireAdmin(streamsse.StreamHandler(wState)))