Skip to content

Commit 9076529

Browse files
committed
minor #12623 Update profiler.rst (noniagriconomie)
This PR was submitted for the master branch but it was merged into the 4.3 branch instead (closes #12623). Discussion ---------- Update profiler.rst No need to add the header `Symfony-Debug-Toolbar-Replace` if the request is not an ajax one Commits ------- 27f7029 Update profiler.rst
2 parents a00a407 + 27f7029 commit 9076529

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

profiler.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,11 @@ event::
206206
if (!$this->getKernel()->isDebug()) {
207207
return;
208208
}
209+
210+
$request = $event->getRequest();
211+
if (!$request->isXmlHttpRequest()) {
212+
return;
213+
}
209214

210215
$response = $event->getResponse();
211216
$response->headers->set('Symfony-Debug-Toolbar-Replace', 1);

0 commit comments

Comments
 (0)