I use yii2 and apache for my server. When I try to change the HTTP headers nothing changes.
Yii::$app->response->headers->set('Pragma', 'cache');
The default is Pragma: no-cache . This is both in my controller and in the configuration files. I tried suggesting to change the headers directly using
headers("Pragma: cache");
This works fine, what could be the problem when using the Response class in Yii2?
source share