Stop calling the env function in naughty places
This commit is contained in:
@@ -35,6 +35,7 @@ class AppComposer
|
||||
$view->withAppBannerType(Setting::get('app_banner_type'));
|
||||
$view->withAppDomain(Setting::get('app_domain'));
|
||||
$view->withAppName(Setting::get('app_name'));
|
||||
$view->withAppUrl(Config::get('app.url'));
|
||||
$view->withShowSupport(Setting::get('show_support'));
|
||||
$view->withSubscribersEnabled($isEnabled && $mailAddress && $mailFrom);
|
||||
}
|
||||
|
||||
@@ -76,7 +76,6 @@ class SendIncidentEmailNotificationHandler
|
||||
'text_content' => $incident->message,
|
||||
'token' => $subscriber->token,
|
||||
'unsubscribe_link' => route('subscribe.unsubscribe', ['code' => $subscriber->verify_code]),
|
||||
'app_url' => env('APP_URL'),
|
||||
];
|
||||
|
||||
$this->mailer->queue([
|
||||
|
||||
@@ -72,7 +72,6 @@ class SendMaintenanceEmailNotificationHandler
|
||||
'scheduled_at' => $data->scheduled_at_formatted,
|
||||
'token' => $subscriber->token,
|
||||
'unsubscribe_link' => route('subscribe.unsubscribe', ['code' => $subscriber->verify_code]),
|
||||
'app_url' => env('APP_URL'),
|
||||
];
|
||||
|
||||
$this->mailer->queue([
|
||||
|
||||
@@ -49,7 +49,6 @@ class SendSubscriberVerificationEmailHandler
|
||||
'email' => $event->subscriber->email,
|
||||
'subject' => 'Confirm your subscription.',
|
||||
'link' => route('subscribe.verify', ['code' => $event->subscriber->verify_code]),
|
||||
'app_url' => env('APP_URL'),
|
||||
];
|
||||
|
||||
$this->mailer->queue([
|
||||
|
||||
@@ -49,7 +49,6 @@ class SendInviteUserEmailHandler
|
||||
'email' => $event->invite->email,
|
||||
'subject' => 'You have been invited.',
|
||||
'link' => route('signup.invite', ['code' => $event->invite->code]),
|
||||
'app_url' => env('APP_URL'),
|
||||
];
|
||||
|
||||
$this->mailer->queue([
|
||||
|
||||
@@ -45,7 +45,7 @@ class ConfigServiceProvider extends ServiceProvider
|
||||
$allowedOrigins[] = $domain;
|
||||
}
|
||||
} else {
|
||||
$allowedOrigins[] = env('APP_URL');
|
||||
$allowedOrigins[] = $this->app->config->get('app.url');
|
||||
}
|
||||
|
||||
$this->app->config->set('cors.paths.api/v1/*.allowedOrigins', $allowedOrigins);
|
||||
|
||||
Reference in New Issue
Block a user