mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 14:04:40 -04: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) {
|
if (!$authenticated && $contact && !$contact->password) {
|
||||||
$authenticated = true;
|
$authenticated = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (env('PHANTOMJS_SECRET') && $request->phantomjs_secret && hash_equals(env('PHANTOMJS_SECRET'), $request->phantomjs_secret)) {
|
||||||
|
$authenticated = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$authenticated) {
|
if (!$authenticated) {
|
||||||
|
@ -1203,7 +1203,7 @@ class Invoice extends EntityModel implements BalanceAffecting
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
if (env('PHANTOMJS_BIN_PATH')) {
|
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')) {
|
} elseif ($key = env('PHANTOMJS_CLOUD_KEY')) {
|
||||||
if (Utils::isNinjaDev()) {
|
if (Utils::isNinjaDev()) {
|
||||||
$link = env('TEST_LINK');
|
$link = env('TEST_LINK');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user