config: set_response_headers is not unknown (#5326)

Most fields in the config.Options struct are populated by the
mapstructure package, but the SetResponseHeaders field is handled
separately. As a result, when the set_response_headers key is present,
it also shows up as an unknown config option.

Add this key to the ignoreConfigFields map, to avoid logging an
incorrect "unknown config option" message when set.
This commit is contained in:
Kenneth Jenkins 2024-10-15 12:40:14 -07:00
parent aa55332b34
commit a8c04a9c7d

View file

@ -38,10 +38,12 @@ var (
"routes.set_authorization_header": "https://www.pomerium.com/docs/deploy/core/upgrading#set-authorization-header",
}
// mapstructure has issues with embedded protobuf structs that we should ignore
ignoreConfigFields = map[string]struct{}{
// mapstructure has issues with embedded protobuf structs that we should ignore
"routes.outlier_detection": {},
"routes.health_checks": {},
// set_response_headers is handled separately from mapstructure
"set_response_headers": {},
}
)