I have nginx with upstream.
The upstream sets headers:
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Because I want this page to be cached, in nginx I have following conf:
location ~* ^.+\.(html)$ {
proxy_pass http://websitefarm.php73;
add_header Pragma "";
add_header x-pragma "OK";
expires 1d;
}
it successfully remove Expires and Cache-Control, but Pragma stays.
note my test header "x-pragma" is set. so definitely conf "works"
expires: Sat, 25 Jul 2020 12:13:04 GMT
cache-control: max-age=86400
pragma: no-cache
x-pragma: OK
if i try set "Pragma" to something else, it works, but "" not seems to work.
Seems like this can be removed only with
proxy_hide_header
directiveFollowing config works:
This is a PHP configuration issue. You have set
session.cache_limiter
tonocache
, either by leaving it at its default or by setting it explicitly in code, or both.If the pages of interest are indeed cacheable, and are not for logged-in users, you need to have a chat with the application's developer about the inappropriate use of sessions.