mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 16:04:32 -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);
|
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
|
// Check if a new version was installed
|
||||||
if (! Utils::isNinja()) {
|
if (! Utils::isNinja()) {
|
||||||
$file = storage_path() . '/version.txt';
|
$file = storage_path() . '/version.txt';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user