From 32ecf1c60c17905b3c95aa086267be27f667beb2 Mon Sep 17 00:00:00 2001 From: Devansh Bawari Date: Thu, 1 Sep 2022 09:23:21 +0530 Subject: [PATCH] Trust Hosts Added --- 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 a3361eba6..ecf02526a 100755 --- 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, \Illuminate\Http\Middleware\HandleCors::class, \Webkul\Core\Http\Middleware\CheckForMaintenanceMode::class, diff --git a/app/Http/Middleware/TrustHosts.php b/app/Http/Middleware/TrustHosts.php new file mode 100644 index 000000000..7186414c6 --- /dev/null +++ b/app/Http/Middleware/TrustHosts.php @@ -0,0 +1,20 @@ + + */ + public function hosts() + { + return [ + $this->allSubdomainsOfApplicationUrl(), + ]; + } +}