Add support for phantomjs secret
This commit is contained in:
parent
05886a5ed1
commit
9c6b9fc439
2 changed files with 5 additions and 1 deletions
|
|
@ -80,6 +80,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) {
|
||||
|
|
|
|||
|
|
@ -1221,7 +1221,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…
Add table
Reference in a new issue