Fixes #22264 - add support for Chrome headless, see also Seldaek/monolog#966

This commit is contained in:
Douglas Reith 2017-04-05 12:36:22 +00:00
parent 405a1a4edc
commit a03dbd2cca
1 changed files with 1 additions and 1 deletions

View File

@ -41,7 +41,7 @@ class ChromePhpHandler extends BaseChromePhpHandler
return;
}
if (!preg_match('{\b(?:Chrome/\d+(?:\.\d+)*|Firefox/(?:4[3-9]|[5-9]\d|\d{3,})(?:\.\d)*)\b}', $event->getRequest()->headers->get('User-Agent'))) {
if (!preg_match('{\b(?:Chrome/\d+(?:\.\d+)*|HeadlessChrome|Firefox/(?:4[3-9]|[5-9]\d|\d{3,})(?:\.\d)*)\b}', $event->getRequest()->headers->get('User-Agent'))) {
$this->sendHeaders = false;
$this->headers = array();