From 5639581ea56ecd556cdf6e6edc37ce5795740fd7 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 18 May 2020 16:50:22 -0500 Subject: [PATCH] add basic trust host middleware --- app/Http/Kernel.php | 1 + app/Http/Middleware/TrustHosts.php | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 app/Http/Middleware/TrustHosts.php diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index c3640f30..36ced134 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -14,6 +14,7 @@ class Kernel extends HttpKernel * @var array */ protected $middleware = [ + // \App\Http\Middleware\TrustHosts::class, \App\Http\Middleware\TrustProxies::class, \Fruitcake\Cors\HandleCors::class, \App\Http\Middleware\CheckForMaintenanceMode::class, diff --git a/app/Http/Middleware/TrustHosts.php b/app/Http/Middleware/TrustHosts.php new file mode 100644 index 00000000..b0550cfc --- /dev/null +++ b/app/Http/Middleware/TrustHosts.php @@ -0,0 +1,20 @@ +allSubdomainsOfApplicationUrl(), + ]; + } +}