mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Add support for phantomjs secret
This commit is contained in:
parent
05886a5ed1
commit
9c6b9fc439
@ -80,6 +80,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) {
|
||||||
|
@ -1221,7 +1221,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