Cache control header missing for HEAD request but works for GET.

curl -I https://localhost/support.html  -k
HTTP/1.1 200 OK
Date: Thu, 19 Nov 2020 16:35:48 GMT
Server: Apache
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Frame-Options: SAMEORIGIN
Content-Security-Policy: frame-ancestors 'self'
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Content-Type: text/html;charset=utf-8
Content-Language: en

Using GET

curl -i http://localhost/support.html
Server: Apache
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Frame-Options: SAMEORIGIN
Content-Security-Policy: frame-ancestors 'self'
Last-Modified: Thu, 19 Nov 2020 18:57:55 GMT
Accept-Ranges: bytes
Content-Length: 206001
Expires: Fri, 20 Nov 2020 18:58:00 GMT
Vary: Accept-Encoding
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Cache-Control: public, max-age=86400
Content-Type: text/html
Content-Language: en


Rule Used :


Header set Cache-Control "public, max-age=86400"


this behavior happens when content is not cached on Apache request is
passed to the backend server and on the response header is missing .
when the content is cached on apache header is inserted properly.

Thanks

Rakesh

Reply via email to