Skip to content

Commit

Permalink
fix(server): allow changing local login background url
Browse files Browse the repository at this point in the history
  • Loading branch information
deluan committed Sep 27, 2024
1 parent 1fa245d commit 5be73d4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
2 changes: 1 addition & 1 deletion server/backgrounds/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 5be73d4

Please sign in to comment.