PHP does not work after page is cached.
Thread Starter
cncdev
(@cncdev)
In that case, what is the proper way to add headers that does not require direct modification of the theme?
I have no idea. is it possible with htaccess ?
Thread Starter
cncdev
(@cncdev)
I think I found the issue:
wpFastestCache.php>ln1536:
$response = wp_remote_get($url, array('user-agent' => $user_agent, 'timeout' => 10, 'sslverify' => false, 'headers' => array("cache-control" => "no-store, no-cache, must-revalidate, post-check=0, pre-check=0")));
It looks like you are explicitly defining the headers to enable the cache control in a way that is replacing the page’s HTTP headers instead of appending to them. This can create security issues that most WP developers would miss because it can strip out a wide range of headers that other plugins try to add designed to prevent various kinds of XSS and MiM attacks which are often required to meet certain cyber security compliance standards like HIPPA and PCI.
To fix this, I would suggest using wp_get_http_headers() to first collect HTTP headers from the original page load, then pass them in addition to headers you need to include in your wp_remote_get call.
-
This reply was modified 4 years, 11 months ago by
cncdev.
-
This reply was modified 4 years, 11 months ago by
cncdev.
it is used by the preload feature. you can disable the preload feature.