diff --git a/atlas/atlas.go b/atlas/atlas.go index 06677c651..a0e458ca4 100644 --- a/atlas/atlas.go +++ b/atlas/atlas.go @@ -121,6 +121,10 @@ func (a *Atlas) SeedMapTile(ctx context.Context, m Map, z, x, y uint) error { return defaultAtlas.SeedMapTile(ctx, m, z, x, y) } + if len(m.Params) > 0 { + return nil + } + ctx = context.WithValue(ctx, observability.ObserveVarMapName, m.Name) // confirm we have a cache backend if a.cacher == nil { diff --git a/config/config.go b/config/config.go index e4dd0ca48..aef1a70fa 100644 --- a/config/config.go +++ b/config/config.go @@ -196,6 +196,8 @@ func (c *Config) Validate() error { // check for map layer name / zoom collisions // map of layers to providers mapLayers := map[string]map[string]provider.MapLayer{} + // maps with configured parameters for logging + mapsWithCustomParams := []string{} for mapKey, m := range c.Maps { // validate any declared query parameters @@ -203,6 +205,10 @@ func (c *Config) Validate() error { return err } + if len(m.Parameters) > 0 { + mapsWithCustomParams = append(mapsWithCustomParams, string(m.Name)) + } + if _, ok := mapLayers[string(m.Name)]; !ok { mapLayers[string(m.Name)] = map[string]provider.MapLayer{} } @@ -300,6 +306,13 @@ func (c *Config) Validate() error { } } + if len(mapsWithCustomParams) > 0 { + log.Infof( + "Caching is disabled for these maps, since they have configured custom parameters: %s", + strings.Join(mapsWithCustomParams, ", "), + ) + } + // check for blacklisted headers for k := range c.Webserver.Headers { for _, v := range blacklistHeaders {