fix(http): block /install page after setup is complete

- skip SPA fallback for `/install` and `/install/*` in main server
- keep install wizard accessible only during `RunInstallServer` phase
- prevent post-install access to install UI
This commit is contained in:
line-6000
2026-04-23 00:39:22 +08:00
parent 3a3a830d93
commit 09514a6946
175 changed files with 598 additions and 232 deletions
+8 -1
View File
@@ -6,6 +6,7 @@ import (
"os"
"os/signal"
"path/filepath"
"strings"
"time"
"github.com/assimon/luuu/bootstrap"
@@ -73,7 +74,13 @@ func HttpServerStart() {
}
e.Use(echoMiddleware.StaticWithConfig(echoMiddleware.StaticConfig{
Skipper: func(c echo.Context) bool {
return luluHttp.ShouldSkipSPAFallback(c.Request().URL.Path)
path := c.Request().URL.Path
if path == "/install" || strings.HasPrefix(path, "/install/") {
// The install wizard is only served by install.RunInstallServer
// before bootstrap. Once main server starts, block /install.
return true
}
return luluHttp.ShouldSkipSPAFallback(path)
},
HTML5: true,
Index: "index.html",