mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 13:14:30 -04:00
Add check for headless browsers
This commit is contained in:
parent
958e8fd29a
commit
677224e7e9
@ -55,6 +55,12 @@ class StartupCheck
|
||||
return $next($request);
|
||||
}
|
||||
|
||||
// Check to prevent headless browsers from triggering activity
|
||||
if (Utils::isNinja() && ! $request->phantomjs && strpos($request->header('User-Agent'), 'Headless') !== false) {
|
||||
Utils::logError('[Headless Browser] ' . json_encode($request->headers->all()), 'PHP', true);
|
||||
exit('Headless browsers are not supported');
|
||||
}
|
||||
|
||||
// Check if a new version was installed
|
||||
if (! Utils::isNinja()) {
|
||||
$file = storage_path() . '/version.txt';
|
||||
|
Loading…
x
Reference in New Issue
Block a user