[Solved} Plugin headers only works in manager login

Hello, I’m building this cache headers plugin for the website, here the code:

Plugin headersCache :: OnWebPagePrerender


$days = 7;
$cache = "max-age="; 
$cache .= $days*86400;

$expires = gmdate("D, d M Y H:i:s", time() + $seconds_to_cache) . " GMT";

header("Expires: $expires");
header("Cache-Control: $cache, private, must-revalidate");

It is working fine but only if I’m logged into the manager. Got any resource right click on view then I can see the headers but once I logout from manager headers gone to default php headers.

In theory they should be working with or without manager login isn’t?

Any idea why this s happening? Thanks!

Jmmmm, I had a .user.ini file in the public_html folder that was overrating the headers.
Problem solved, sorry for the inconvenience! :roll_eyes: