diff --git a/internal/api/library_test.go b/internal/api/library_test.go index 97544d40..e99ce9fe 100644 --- a/internal/api/library_test.go +++ b/internal/api/library_test.go @@ -465,7 +465,7 @@ func TestRoutesRegisteredInMount(t *testing.T) { r := chi.NewRouter() w := playevents.NewWriter(h.pool, slog.New(slog.NewTextHandler(io.Discard, nil)), 30*time.Minute, 0.5, 30000) - Mount(r, h.pool, h.logger, w, config.RecommendationConfig{RadioSize: 50, RadioSizeMax: 200, RecentlyPlayedHours: 1}, h.recSettings, h.lidarrCfg, h.lidarrRequests, h.lidarrQuarantine, h.tracks, h.playlists, h.coverart, h.coverSettings, h.tagSettings, h.scanner, h.scanCfg, h.dataDir, nil, eventbus.New(), nil, nil) + Mount(r, h.pool, h.logger, w, config.RecommendationConfig{RadioSize: 50, RadioSizeMax: 200, RecentlyPlayedHours: 1}, h.recSettings, h.lidarrCfg, h.lidarrRequests, h.lidarrQuarantine, h.tracks, h.playlists, h.coverart, h.coverSettings, h.tagSettings, h.scanner, h.scanCfg, h.dataDir, nil, eventbus.New(), nil, nil, h.netSettings) paths := []string{ "/api/artists", diff --git a/internal/netsettings/service.go b/internal/netsettings/service.go index 0f062ab6..27bcff40 100644 --- a/internal/netsettings/service.go +++ b/internal/netsettings/service.go @@ -94,5 +94,11 @@ func (s *Service) SetHops(ctx context.Context, hops int) error { s.mu.Lock() s.hops = int(row.TrustedProxyHops) s.mu.Unlock() + // Worth a line in the log: this changes how much of a client-supplied + // header the server believes, so an operator debugging odd addresses in + // the sessions list wants to see when it last moved. + if s.logger != nil { + s.logger.Info("netsettings: trusted proxy hops updated", "hops", hops) + } return nil }