Skip to content

🎧 Your Personal Streaming Service

fix(server): allow changing local login background url

Deluan5be73d404f89
diff --git a/cmd/root.go b/cmd/root.go
index f411797fb..b6aa0d708 100644
--- a/cmd/root.go
+++ b/cmd/root.go
@@ -119,7 +119,7 @@ func startServer(ctx context.Context) func() error {
a.MountRouter("Profiling", "/debug", middleware.Profiler())
}
if strings.HasPrefix(conf.Server.UILoginBackgroundURL, "/") {
- a.MountRouter("Background images", consts.DefaultUILoginBackgroundURL, backgrounds.NewHandler())
+ a.MountRouter("Background images", conf.Server.UILoginBackgroundURL, backgrounds.NewHandler())
}
return a.Run(ctx, conf.Server.Address, conf.Server.Port, conf.Server.TLSCert, conf.Server.TLSKey)
}
diff --git a/server/backgrounds/handler.go b/server/backgrounds/handler.go
index dfaa2f4d6..5f6a0a02d 100644
--- a/server/backgrounds/handler.go
+++ b/server/backgrounds/handler.go
@@ -24,7 +24,7 @@ type Handler struct {
func NewHandler() *Handler {
h := &Handler{}
go func() {
- _, _ = h.getImageList(context.Background())
+ _, _ = h.getImageList(log.NewContext(context.Background()))
}()
return h
}