Shift core files

This commit is contained in:
Laravel Shift 2021-02-14 18:57:23 +00:00
parent 8a6be4ea47
commit a6f58f867f
2 changed files with 21 additions and 1 deletions

View file

@ -31,6 +31,7 @@ class Kernel extends HttpKernel
*/
protected $middleware = [
\App\Http\Middleware\TrustProxies::class,
\Fruitcake\Cors\HandleCors::class,
\App\Http\Middleware\CheckForMaintenanceMode::class,
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
\App\Http\Middleware\TrimStrings::class,
@ -65,7 +66,6 @@ class Kernel extends HttpKernel
'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
'cors' => \Barryvdh\Cors\HandleCors::class,
'auth.oauth' => \App\Http\Middleware\AuthenticateOAuth::class,
'json-exceptions' => \App\Http\Middleware\JsonExceptions::class,
];

View file

@ -0,0 +1,20 @@
<?php
namespace App\Http\Middleware;
use Illuminate\Http\Middleware\TrustHosts as Middleware;
class TrustHosts extends Middleware
{
/**
* Get the host patterns that should be trusted.
*
* @return array
*/
public function hosts()
{
return [
$this->allSubdomainsOfApplicationUrl(),
];
}
}