I'm trying to attach response headers (like "Pragma: no-cache") to the response for frontend pages.
If I'm the one instantiating the response object, I could just call header
method on it as described in this October documentation.
But, to do that from a component, I need to return the response object from onRun method of the component, and it will terminate the layout lifecycle.
I thought about creating middleware to do this, but is there any easier way to add response headers for frontend pages without terminating the layout lifecycle?