Skip to content

Commit 96da7c8

Browse files
committed
[MonologBridge] Added the user agent check for the ChromePhpHandler
1 parent f7aa6c0 commit 96da7c8

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/Symfony/Bridge/Monolog/Handler/ChromePhpHandler.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,13 @@ public function onKernelResponse(FilterResponseEvent $event)
4242
return;
4343
}
4444

45-
/* TODO: change this part once ChromePhpHandler has a way to detect the extension
46-
if (!preg_match('{\bFirePHP/\d+\.\d+\b}', $event->getRequest()->headers->get('User-Agent'))
47-
&& !$event->getRequest()->headers->has('X-FirePHP-Version')) {
45+
if (!preg_match('{\bChrome/\d+[\.\d+]*\b}', $event->getRequest()->headers->get('User-Agent'))) {
4846

4947
$this->sendHeaders = false;
5048
$this->headers = array();
5149

5250
return;
5351
}
54-
*/
5552

5653
$this->response = $event->getResponse();
5754
foreach ($this->headers as $header => $content) {

0 commit comments

Comments
 (0)