From 5be73d404f897892b4fad98248c52d1eabd73e7a Mon Sep 17 00:00:00 2001 From: Deluan Date: Fri, 27 Sep 2024 15:18:20 -0400 Subject: [PATCH] fix(server): allow changing local login background url --- cmd/root.go | 2 +- server/backgrounds/handler.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 }