File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66use Neos \Flow \Http \Component \ComponentChain ;
77use Neos \Flow \Http \Component \ComponentContext ;
88use Neos \Flow \Http \Component \ComponentInterface ;
9+ use Neos \Flow \Security \SessionDataContainer ;
10+ use Neos \Flow \Session \SessionManagerInterface ;
911use function GuzzleHttp \Psr7 \parse_response ;
1012
1113/**
@@ -25,6 +27,18 @@ class RequestInterceptorComponent implements ComponentInterface
2527 */
2628 protected $ enabled ;
2729
30+ /**
31+ * @Flow\Inject(lazy=false)
32+ * @var SessionManagerInterface
33+ */
34+ protected $ sessionManager ;
35+
36+ /**
37+ * @Flow\Inject
38+ * @var SessionDataContainer
39+ */
40+ protected $ sessionDataContainer ;
41+
2842 /**
2943 * @inheritDoc
3044 */
@@ -43,6 +57,10 @@ public function handle(ComponentContext $componentContext)
4357 return ;
4458 }
4559
60+ if ($ this ->sessionManager ->getCurrentSession ()->isStarted () && !empty ($ this ->sessionDataContainer ->getSecurityTokens ())) {
61+ return ;
62+ }
63+
4664 $ entryIdentifier = md5 ((string )$ request ->getUri ());
4765
4866 $ entry = $ this ->cacheFrontend ->get ($ entryIdentifier );
Original file line number Diff line number Diff line change @@ -60,6 +60,10 @@ public function handle(ComponentContext $componentContext)
6060 return ;
6161 }
6262
63+ if ($ response ->hasHeader ('Set-Cookie ' )) {
64+ return ;
65+ }
66+
6367 $ entryIdentifier = md5 ((string )$ request ->getUri ());
6468
6569 $ lifetime = $ this ->contentCacheAspect ->getShortestLifetime ();
You can’t perform that action at this time.
0 commit comments