config: set_response_headers is not unknown

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 09:55:58 -07:00
parent 075ea01b0a
commit de9e54ee13

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": {},
}
)