This PR was merged into the 2.7 branch.
Discussion
----------
Fixes #22264 - add support for Chrome headless
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #22264
| License | MIT
| Doc PR |
Commits
-------
a03dbd2cca
Fixes #22264 - add support for Chrome headless, see also Seldaek/monolog#966
This commit is contained in:
commit
cb49907570
@ -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();
|
||||
|
||||
|
Reference in New Issue
Block a user