Skip to content

Commit

Permalink
Merge pull request #22 from pryley/fix/issue-21
Browse files Browse the repository at this point in the history
replace env() with config()
  • Loading branch information
robdekort authored Aug 28, 2020
2 parents 424de27 + 48c181e commit 236696c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions app/Http/Controllers/DynamicToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ class DynamicToken extends Controller
public function getRefresh(Request $request)
{
// Determine if the request is actually coming from our own website on non local enviroments.
if (env('APP_ENV') != 'local')
if (config('app.env') != 'local')
{
$referer = request()->headers->get('referer');
$startWithAppUrl = starts_with($referer, env('APP_URL'));
$startWithAppUrl = starts_with($referer, config('app.url'));
if (empty($referer) || !$startWithAppUrl) {
abort(404);
}
}

return csrf_token();
}
}
}
6 changes: 3 additions & 3 deletions resources/lang/en/site.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
'form_mail_body_sender' => 'Thanks for your message. We will contact you as soon as possible.',
'form_mail_body_owner' => 'A contact form has been sent.',
'form_mail_closing' => 'Kind regards',
'form_mail_from' => env('APP_NAME'),
'form_mail_url' => env('APP_URL'),
'form_mail_from' => config('app.name'),
'form_mail_url' => config('app.url'),
'form_mail_logo' => 'https://studio1902.ams3.cdn.digitaloceanspaces.com/assets/statamic-peak/statamic-peak-logo.svg',
];
];

0 comments on commit 236696c

Please sign in to comment.