Update base laravel classess and middleware

This commit is contained in:
DariusIII
2019-01-09 11:02:41 +01:00
parent 718cf02857
commit 86b500bdb5
8 changed files with 54 additions and 6 deletions
+1 -1
View File
@@ -12,4 +12,4 @@ trim_trailing_whitespace = true
trim_trailing_whitespace = false
[*.yml]
indent_size = 2
indent_size = 2
+2
View File
@@ -1,3 +1,5 @@
2019-01-09 DariusIII
* Chg: Update base laravel classess and middleware
2019-01-08 DariusIII
* Chg: Update laravel/framework to version 5.7.20
* Fix: Fix switched categories for TV and PC for users excluded categories views
+3 -2
View File
@@ -29,10 +29,11 @@ class Handler extends ExceptionHandler
/**
* Report or log an exception.
*
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
*
* @param \Exception $exception
* @param \Exception $exception
*
* @return void
* @throws \Exception
*/
public function report(Exception $exception)
{
+21
View File
@@ -0,0 +1,21 @@
<?php
namespace App\Http\Middleware;
use Illuminate\Auth\Middleware\Authenticate as Middleware;
class Authenticate extends Middleware
{
/**
* Get the path the user should be redirected to when they are not authenticated.
*
* @param \Illuminate\Http\Request $request
* @return string
*/
protected function redirectTo($request)
{
if (! $request->expectsJson()) {
return route('login');
}
}
}
@@ -0,0 +1,17 @@
<?php
namespace App\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode as Middleware;
class CheckForMaintenanceMode extends Middleware
{
/**
* The URIs that should be reachable while maintenance mode is enabled.
*
* @var array
*/
protected $except = [
//
];
}
+2 -2
View File
@@ -15,9 +15,9 @@ class TrustProxies extends Middleware
protected $proxies;
/**
* The current proxy header mappings.
* The headers that should be used to detect proxies.
*
* @var array
* @var int
*/
protected $headers = Request::HEADER_X_FORWARDED_ALL;
}
+7
View File
@@ -6,6 +6,13 @@ use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
class VerifyCsrfToken extends Middleware
{
/**
* 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.
*
+1 -1
View File
@@ -12,7 +12,7 @@
*/
$app = new Illuminate\Foundation\Application(
dirname(__DIR__)
$_ENV['APP_BASE_PATH'] ?? dirname(__DIR__)
);
/*