Stop calling the env function in naughty places

This commit is contained in:
Graham Campbell
2015-11-21 22:43:06 +00:00
parent 0e6ac90f7b
commit 236d52714d
6 changed files with 2 additions and 5 deletions

View File

@@ -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);
}

View File

@@ -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([

View File

@@ -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([

View File

@@ -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([

View File

@@ -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([

View File

@@ -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);