8000 [WebProfilerBundle] Fix interception for non conventional redirects · symfony/web-profiler-bundle@7b1725c · GitHub
[go: up one dir, main page]

Skip to content

Commit 7b1725c

Browse files
Hulutinicolas-grekas
authored andcommitted
[WebProfilerBundle] Fix interception for non conventional redirects
1 parent 979b623 commit 7b1725c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

EventListener/WebDebugToolbarListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public function onKernelResponse(ResponseEvent $event): void
107107
return;
108108
}
109109

110-
if ($response->headers->has('X-Debug-Token') && $response->isRedirect() && $this->interceptRedirects && 'html' === $request->getRequestFormat()) {
110+
if ($response->headers->has('X-Debug-Token') && $response->isRedirect() && $this->interceptRedirects && 'html' === $request->getRequestFormat() && $response->headers->has('Location')) {
111111
if ($request->hasSession() && ($session = $request->getSession())->isStarted() && $session->getFlashBag() instanceof AutoExpireFlashBag) {
112112
// keep current flashes for one more request if using AutoExpireFlashBag
113113
$session->getFlashBag()->setAll($session->getFlashBag()->peekAll());

0 commit comments

Comments
 (0)
0