Add Vary header in case of content negotiation
Sometimes we return different content depending on whether JSON, XML or HTML was requested in the Accept request header. The Vary response header should list that header in these cases, to allow caching frameworks to determine what to cache.
This commit is contained in:
@@ -162,6 +162,8 @@ class Display extends BaseModule
|
||||
|
||||
$output .= $this->getDisplayData($item);
|
||||
|
||||
header('Vary: Accept', false);
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user