Ajout de sécurité sur le https laravel

This commit is contained in:
2026-03-30 21:59:34 +02:00
parent 0da54295a7
commit a73cd76d86
3 changed files with 34 additions and 2 deletions
+5 -1
View File
@@ -3,6 +3,7 @@
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\URL;
class AppServiceProvider extends ServiceProvider
{
@@ -19,6 +20,9 @@ class AppServiceProvider extends ServiceProvider
*/
public function boot(): void
{
//
// Forcer HTTPS en production et staging
if (!app()->environment('local')) {
URL::forceScheme('https');
}
}
}