You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to set custom response headers on all resources in a generic way.
The naive approach would be to implement a @ServerResponseFilter.
However, as pointed out in #44898 (comment), this approach does not work for resources returning a Multi.
Having a generic way to set custom response headers is a prerequisite to supporting features like setting a traceresponse header (see 11931 for an example use case).
Currently, one would need to implement a @ServerResponseFilter handling all non-multi resources and set the response headers on each multi resource individually with RestMulti.fromMultiData(...).headers. There is also #44902 preventing even this approach for SSE-annotated resources.
I'd propose reconsidering adding support for @ServerResponseFilter on Multi resources or thinking about an alternative way to set response headers in a generic, filter-like way.
Implementation ideas
No response
The text was updated successfully, but these errors were encountered:
Description
I'd like to set custom response headers on all resources in a generic way.
The naive approach would be to implement a
@ServerResponseFilter
.However, as pointed out in #44898 (comment), this approach does not work for resources returning a Multi.
Having a generic way to set custom response headers is a prerequisite to supporting features like setting a
traceresponse
header (see 11931 for an example use case).Currently, one would need to implement a
@ServerResponseFilter
handling all non-multi resources and set the response headers on each multi resource individually withRestMulti.fromMultiData(...).headers
. There is also #44902 preventing even this approach for SSE-annotated resources.I'd propose reconsidering adding support for
@ServerResponseFilter
on Multi resources or thinking about an alternative way to set response headers in a generic, filter-like way.Implementation ideas
No response
The text was updated successfully, but these errors were encountered: