mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-09-20 08:21:34 +02:00
Add support for phantomjs secret
This commit is contained in:
parent
d92b177831
commit
2ad7c609d9
@ -77,6 +77,10 @@ class Authenticate
|
||||
if (!$authenticated && $contact && !$contact->password) {
|
||||
$authenticated = true;
|
||||
}
|
||||
|
||||
if (env('PHANTOMJS_SECRET') && $request->phantomjs_secret && hash_equals(env('PHANTOMJS_SECRET'), $request->phantomjs_secret)) {
|
||||
$authenticated = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$authenticated) {
|
||||
|
@ -1203,7 +1203,7 @@ class Invoice extends EntityModel implements BalanceAffecting
|
||||
|
||||
try {
|
||||
if (env('PHANTOMJS_BIN_PATH')) {
|
||||
$pdfString = CurlUtils::phantom('GET', $link . '?phantomjs=true');
|
||||
$pdfString = CurlUtils::phantom('GET', $link . '?phantomjs=true&phantomjs_secret=' . env('PHANTOMJS_SECRET'));
|
||||
} elseif ($key = env('PHANTOMJS_CLOUD_KEY')) {
|
||||
if (Utils::isNinjaDev()) {
|
||||
$link = env('TEST_LINK');
|
||||
|
Loading…
Reference in New Issue
Block a user