mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: Added X-Forwarded-Protocol and User-Agent to Vary header.
This commit is contained in:
parent
b63e55a77a
commit
b114aa2488
@ -287,6 +287,10 @@ class HTTP {
|
||||
if(self::$cache_age > 0) {
|
||||
$responseHeaders["Cache-Control"] = "max-age=" . self::$cache_age . ", must-revalidate";
|
||||
$responseHeaders["Pragma"] = "";
|
||||
|
||||
// To do: User-Agent should only be added in situations where you *are* actually varying according to user-agent.
|
||||
$responseHeaders['Vary'] = 'Cookie, X-Forwarded-Protocol, User-Agent';
|
||||
|
||||
} else {
|
||||
$responseHeaders["Cache-Control"] = "no-cache, max-age=0, must-revalidate";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user