ui: Avoid panic when not compiled with ui

This commit is contained in:
nemunaire 2024-01-02 12:53:45 +01:00
parent e470cfab5b
commit 8715325edc
1 changed files with 4 additions and 0 deletions

View File

@ -136,6 +136,10 @@ func serveOrReverse(forced_url string, cfg *config.Options) gin.HandlerFunc {
}
}
}
} else if Assets == nil {
return func(c *gin.Context) {
c.String(http.StatusNotFound, "404 Page not found - interface not embedded in binary, please compile with -tags ui")
}
} else if forced_url == "/" {
// Serve altered index.html
return func(c *gin.Context) {