Skip to content

Commit a722c88

Browse files
committed
Update ajax request check to use wantsJson vs isXmlHttpRequest
1 parent 8ce814e commit a722c88

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Barryvdh/Debugbar/LaravelDebugBar.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ public function modifyResponse($request, $response){
353353
}catch(\Exception $e){
354354
$app['log']->error('Debugbar exception: '.$e->getMessage());
355355
}
356-
}elseif( $request->isXmlHttpRequest() and $app['config']->get('laravel-debugbar::config.capture_ajax', true)){
356+
}elseif( ($request->isXmlHttpRequest() || $request->wantsJson()) and $app['config']->get('laravel-debugbar::config.capture_ajax', true)){
357357
try {
358358
$this->sendDataInHeaders(true);
359359
}catch(\Exception $e){

0 commit comments

Comments
 (0)