Skip to content

Commit e80ebc0

Browse files
committed
Merge remote-tracking branch 'remotes/origin/2.1' into 2.2
2 parents 9d2652c + bae8be4 commit e80ebc0

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/Controller/InvalidateTokenController.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use Symfony\Component\HttpFoundation\Response;
1111
use Symfony\Component\HttpFoundation\Request;
1212
use eZ\Publish\Core\MVC\ConfigResolverInterface;
13+
use Symfony\Component\HttpKernel\EventListener\SessionListener;
1314

1415
class InvalidateTokenController
1516
{
@@ -74,6 +75,8 @@ public function tokenAction(Request $request)
7475
$headers->set('X-Invalidate-Token', $this->configResolver->getParameter('http_cache.varnish_invalidate_token'));
7576
$response->setSharedMaxAge($this->ttl);
7677
$response->setVary('Accept', true);
78+
// header to avoid Symfony SessionListener overwriting the response to private
79+
$response->headers->set(SessionListener::NO_AUTO_CACHE_CONTROL_HEADER, 1);
7780

7881
return $response;
7982
}

src/Twig/ContentTaggingExtension.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ public function getFunctions()
4040
'ez_http_cache_tag_location',
4141
[$this, 'tagHttpCacheForLocation']
4242
),
43+
// For 2.5 BC, and to be consistent with the other functions, to be cleaned up with new prefix in the future
44+
new TwigFunction(
45+
'ez_http_tag_location',
46+
[$this, 'tagHttpCacheForLocation']
47+
),
4348
new TwigFunction(
4449
'ez_http_tag_relation_ids',
4550
[$this, 'tagHttpCacheForRelationIds']

0 commit comments

Comments
 (0)