Apache2.4缓存控制报头在内容未缓存时丢失,是不是因为请求是HEAD而不是GET,这一行为在2.2上是不同的,head和post具有缓存控制报头。
curl -I https://localhost/test.html
HTTP/1.1 200 OK
Date: Sat, 14 Nov 2020 00:10:39 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
curl -I https://localhost/test.html
HTTP/1.1 200 OK
Date: Sat, 14 Nov 2020 00:25:24 GMT
Server: Apache
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Frame-Options: SAMEORIGIN
Content-Security-Policy: frame-ancestors 'self'
Last-Modified: Sat, 14 Nov 2020 00:25:19 GMT
Accept-Ranges: bytes
Content-Length: 206004
Expires: Sun, 15 Nov 2020 00:25:24 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发布于 2021-10-21 23:38:25
Apache2.4上的默认行为,当数据存储在apache中时,则显示标题信息,否则不显示。
https://stackoverflow.com/questions/64829736
复制相似问题