Skip to content

Commit 41f753b

Browse files
committed
force ssl
1 parent e31cc25 commit 41f753b

File tree

2 files changed

+3
-24
lines changed

2 files changed

+3
-24
lines changed

app/Providers/AppServiceProvider.php

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -14,30 +14,8 @@ class AppServiceProvider extends ServiceProvider
1414
*/
1515
public function boot()
1616
{
17-
\Blade::if('respo_vente', function ()
18-
{
19-
return auth()->check() && auth()->user()->est(Utilisateur::RESPO_VENTE);
20-
});
21-
22-
\Blade::if('respo_comm', function ()
23-
{
24-
return auth()->check() && auth()->user()->est(Utilisateur::RESPO_COMM);
25-
});
26-
27-
\Blade::if('respo_adh', function ()
28-
{
29-
return auth()->check() && auth()->user()->est(Utilisateur::RESPO_ADH);
30-
});
31-
32-
\Blade::if('adherent', function ()
33-
{
34-
return auth()->check() && auth()->user()->est(Utilisateur::ADHERENT);
35-
});
36-
37-
\Blade::if('admin', function ()
38-
{
39-
return auth()->check() && auth()->user()->est(Utilisateur::ADMIN);
40-
});
17+
if (config("app.force_ssl"))
18+
\URL::forceScheme('https');
4119

4220
\Blade::setEchoFormat('nl2br(e(%s))');
4321
}

config/app.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,4 +228,5 @@
228228

229229
],
230230

231+
'force_ssl' => env('APP_FORCE_SSL', false),
231232
];

0 commit comments

Comments
 (0)