From 953afd6b709cae39e5176973306bb5ae6354883f Mon Sep 17 00:00:00 2001 From: Shift Date: Sat, 7 Jan 2023 19:53:57 +0000 Subject: [PATCH] Shift core files --- app/Http/Kernel.php | 17 ----------------- app/Http/Middleware/TrustHosts.php | 20 ++++++++++++++++++++ app/Http/Middleware/VerifyCsrfToken.php | 7 ------- 3 files changed, 20 insertions(+), 24 deletions(-) create mode 100644 app/Http/Middleware/TrustHosts.php diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index b7b5787c9..4f8f1aff8 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -70,21 +70,4 @@ class Kernel extends HttpKernel 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, 'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class, ]; - - /** - * The priority-sorted list of middleware. - * - * This forces non-global middleware to always be in the given order. - * - * @var array - */ - protected $middlewarePriority = [ - \Illuminate\Session\Middleware\StartSession::class, - \Illuminate\View\Middleware\ShareErrorsFromSession::class, - \App\Http\Middleware\Authenticate::class, - \Illuminate\Routing\Middleware\ThrottleRequests::class, - \Illuminate\Session\Middleware\AuthenticateSession::class, - \Illuminate\Routing\Middleware\SubstituteBindings::class, - \Illuminate\Auth\Middleware\Authorize::class, - ]; } diff --git a/app/Http/Middleware/TrustHosts.php b/app/Http/Middleware/TrustHosts.php new file mode 100644 index 000000000..b0550cfc7 --- /dev/null +++ b/app/Http/Middleware/TrustHosts.php @@ -0,0 +1,20 @@ +allSubdomainsOfApplicationUrl(), + ]; + } +} diff --git a/app/Http/Middleware/VerifyCsrfToken.php b/app/Http/Middleware/VerifyCsrfToken.php index f0e04ccb1..ccabe5e1e 100644 --- a/app/Http/Middleware/VerifyCsrfToken.php +++ b/app/Http/Middleware/VerifyCsrfToken.php @@ -7,13 +7,6 @@ use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as BaseVerifier; class VerifyCsrfToken extends BaseVerifier { - /** - * Indicates whether the XSRF-TOKEN cookie should be set on the response. - * - * @var bool - */ - protected $addHttpCookie = true; - /** * The URIs that should be excluded from CSRF verification. *