From dfcb5b1c4e8cb1f749dc47e7d310b1d0891c8eeb Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sat, 30 Jun 2018 14:37:53 +0200 Subject: Began Laravel environment --- app/Http/Middleware/EncryptCookies.php | 17 ++++++++++++++++ app/Http/Middleware/RedirectIfAuthenticated.php | 26 +++++++++++++++++++++++++ app/Http/Middleware/TrimStrings.php | 18 +++++++++++++++++ app/Http/Middleware/TrustProxies.php | 23 ++++++++++++++++++++++ app/Http/Middleware/VerifyCsrfToken.php | 17 ++++++++++++++++ 5 files changed, 101 insertions(+) create mode 100644 app/Http/Middleware/EncryptCookies.php create mode 100644 app/Http/Middleware/RedirectIfAuthenticated.php create mode 100644 app/Http/Middleware/TrimStrings.php create mode 100644 app/Http/Middleware/TrustProxies.php create mode 100644 app/Http/Middleware/VerifyCsrfToken.php (limited to 'app/Http/Middleware') diff --git a/app/Http/Middleware/EncryptCookies.php b/app/Http/Middleware/EncryptCookies.php new file mode 100644 index 0000000..033136a --- /dev/null +++ b/app/Http/Middleware/EncryptCookies.php @@ -0,0 +1,17 @@ +check()) { + return redirect('/home'); + } + + return $next($request); + } +} diff --git a/app/Http/Middleware/TrimStrings.php b/app/Http/Middleware/TrimStrings.php new file mode 100644 index 0000000..5a50e7b --- /dev/null +++ b/app/Http/Middleware/TrimStrings.php @@ -0,0 +1,18 @@ +