We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Set response headers in Controller Action

In my fooAction how would I go about setting response headers within an action? Current documentation suggests creating a response object and then calling setContent. However, I am using a view to send content and just want to inject some HTTP headers in my response.



9.1k
Accepted
answer

never mind, had to access $this->response. Drew a blank there for a moment.