diff --git a/control/HTTP.php b/control/HTTP.php index 03e776efa84..a6a2074a2c7 100644 --- a/control/HTTP.php +++ b/control/HTTP.php @@ -287,6 +287,10 @@ public static function add_cache_headers($body = null) { 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"; }