Kernel.php 2.11 KB
Newer Older
Dominik Hebeler's avatar
Dominik Hebeler committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
<?php

namespace App\Http;

use Illuminate\Foundation\Http\Kernel as HttpKernel;

class Kernel extends HttpKernel
{
    /**
     * The application's global HTTP middleware stack.
     *
     * These middleware are run during every request to your application.
     *
     * @var array
     */
    protected $middleware = [
        \Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
18
        \Fideloper\Proxy\TrustProxies::class,
Dominik Hebeler's avatar
Dominik Hebeler committed
19
        // \App\Http\Middleware\VerifyCsrfToken::class,
Dominik Hebeler's avatar
Dominik Hebeler committed
20 21 22 23 24 25 26 27 28 29
    ];

    /**
     * The application's route middleware groups.
     *
     * @var array
     */
    protected $middlewareGroups = [
        'web' => [
            \App\Http\Middleware\EncryptCookies::class,
30
            \Illuminate\Routing\Middleware\SubstituteBindings::class,
Dominik Hebeler's avatar
Dominik Hebeler committed
31 32 33 34
        ],

        'api' => [
            'throttle:60,1',
35
            'bindings',
Dominik Hebeler's avatar
Dominik Hebeler committed
36
        ],
Dominik Hebeler's avatar
Dominik Hebeler committed
37 38 39 40 41 42 43 44 45

        'session' => [
            \App\Http\Middleware\EncryptCookies::class,
            \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
            \Illuminate\Session\Middleware\StartSession::class,
            \Illuminate\View\Middleware\ShareErrorsFromSession::class,
            \App\Http\Middleware\VerifyCsrfToken::class,
            \Illuminate\Routing\Middleware\SubstituteBindings::class,
        ],
Dominik Hebeler's avatar
Dominik Hebeler committed
46 47 48 49 50 51 52 53 54 55
    ];

    /**
     * The application's route middleware.
     *
     * These middleware may be assigned to groups or used individually.
     *
     * @var array
     */
    protected $routeMiddleware = [
56 57 58 59 60 61 62
        'auth'          => \Illuminate\Auth\Middleware\Authenticate::class,
        'auth.basic'    => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
        'bindings'      => \Illuminate\Routing\Middleware\SubstituteBindings::class,
        'can'           => \Illuminate\Auth\Middleware\Authorize::class,
        'guest'         => \App\Http\Middleware\RedirectIfAuthenticated::class,
        'throttle'      => \Illuminate\Routing\Middleware\ThrottleRequests::class,
        'referer.check' => \App\Http\Middleware\RefererCheck::class,
Dominik Hebeler's avatar
Dominik Hebeler committed
63
        'humanverification' => \App\Http\Middleware\HumanVerification::class,
Dominik Hebeler's avatar
Dominik Hebeler committed
64 65
    ];
}