mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 10:54:41 -04:00
Check for headless
This commit is contained in:
parent
9c69a279fd
commit
8a6366a8f9
@ -57,8 +57,7 @@ class StartupCheck
|
|||||||
|
|
||||||
// Check to prevent headless browsers from triggering activity
|
// Check to prevent headless browsers from triggering activity
|
||||||
if (Utils::isNinja() && ! $request->phantomjs && strpos($request->header('User-Agent'), 'Headless') !== false) {
|
if (Utils::isNinja() && ! $request->phantomjs && strpos($request->header('User-Agent'), 'Headless') !== false) {
|
||||||
Utils::logError('[Headless Browser] ' . json_encode($request->headers->all()), 'PHP', true);
|
abort(403);
|
||||||
exit('Headless browsers are not supported');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if a new version was installed
|
// Check if a new version was installed
|
||||||
|
Loading…
x
Reference in New Issue
Block a user