Description
Spring Gateway provides filter for adding request header if not already present in request. Similarly, need to add a a filter which can add response header if not already present in response.
As solution, need to add a filter AddResponseHeadersIfNotPresentGatewayFilterFactory
which allows users to configure on route when required. It will add header if not already present in response (need to check also response should be committed).
As alternative, user can develop their own filter to perform similar action. Since it is very common and Spring Cloud Gateway already provides similar feature on Request Header, providing this will help a lot of stakeholders.
Since, response headers may contains some specific symbols (colon (:), comma (,) etc. in Expires or Permission-Policy) so while configuration of new filter in YAML, need to decide a better candidate for separator of key & value.