How to set up custom response HTTP header from a controller in Magento 2

- Fire development, Magento 2

Magento 2 Development

To set up custom response HTTP header from a controller in Magento 2, use the following code:

'

For instance:

Source

More tips from the Cookbook

'