mirror of
https://github.com/cp6/my-idlers.git
synced 2024-11-16 15:33:44 +01:00
Add optional env var to force SSL
This commit is contained in:
parent
2204970248
commit
f9bdc8b124
@ -78,6 +78,7 @@ removed.
|
||||
docker run \
|
||||
-p 8000:8000\
|
||||
-e APP_URL=https://... \
|
||||
-e APP_FORCE_SSL=true \
|
||||
-e DB_HOST=... \
|
||||
-e DB_DATABASE=... \
|
||||
-e DB_USERNAME=... \
|
||||
|
@ -35,7 +35,7 @@ class RouteServiceProvider extends ServiceProvider
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
if (config('app.env') === 'production') {
|
||||
if (config('app.force_ssl')) {
|
||||
\Illuminate\Support\Facades\URL::forceScheme('https');
|
||||
}
|
||||
$this->configureRateLimiting();
|
||||
|
@ -27,6 +27,7 @@ return [
|
||||
*/
|
||||
|
||||
'env' => env('APP_ENV', 'production'),
|
||||
'force_ssl' => (bool) env('APP_FORCE_SSL', false),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user