Kernel.php 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <?php
  2. namespace App\Http;
  3. use Illuminate\Foundation\Http\Kernel as HttpKernel;
  4. class Kernel extends HttpKernel
  5. {
  6. /**
  7. * The application's global HTTP middleware stack.
  8. *
  9. * These middleware are run during every request to your application.
  10. *
  11. * @var array
  12. */
  13. protected $middleware = [
  14. // \App\Http\Middleware\TrustHosts::class,
  15. \App\Http\Middleware\TrustProxies::class,
  16. \Fruitcake\Cors\HandleCors::class,
  17. \App\Http\Middleware\PreventRequestsDuringMaintenance::class,
  18. \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
  19. \App\Http\Middleware\TrimStrings::class,
  20. \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
  21. ];
  22. /**
  23. * The application's route middleware groups.
  24. *
  25. * @var array
  26. */
  27. protected $middlewareGroups = [
  28. 'web' => [
  29. \App\Http\Middleware\EncryptCookies::class,
  30. \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
  31. \Illuminate\Session\Middleware\StartSession::class,
  32. // \Illuminate\Session\Middleware\AuthenticateSession::class,
  33. \Illuminate\View\Middleware\ShareErrorsFromSession::class,
  34. \App\Http\Middleware\VerifyCsrfToken::class,
  35. \Illuminate\Routing\Middleware\SubstituteBindings::class,
  36. \App\Http\Middleware\Localization::class,
  37. \App\Http\Middleware\CheckSendingAPI::class,
  38. ],
  39. 'api' => [
  40. 'throttle:api',
  41. \Illuminate\Routing\Middleware\SubstituteBindings::class,
  42. ],
  43. ];
  44. /**
  45. * The application's route middleware.
  46. *
  47. * These middleware may be assigned to groups or used individually.
  48. *
  49. * @var array
  50. */
  51. protected $routeMiddleware = [
  52. 'auth' => \App\Http\Middleware\Authenticate::class,
  53. 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
  54. 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
  55. 'can' => \Illuminate\Auth\Middleware\Authorize::class,
  56. 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
  57. 'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class,
  58. 'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
  59. 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
  60. 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
  61. 'check.login' => \App\Http\Middleware\CheckLogin::class,
  62. 'check.logout' => \App\Http\Middleware\CheckLogout::class,
  63. 'check.gate.token' => \App\Http\Middleware\CheckGateToken::class,
  64. 'check.pro.member' => \App\Http\Middleware\CheckProMember::class,
  65. 'check.company.sort' => \App\Http\Middleware\CheckCompanySort::class,
  66. 'check.pro.guest' => \App\Http\Middleware\CheckProGuest::class,
  67. 'app.token.manager' => \App\Http\Middleware\AppTokenManager::class,
  68. 'check.device.scale' => \App\Http\Middleware\CheckDeviceScale::class,
  69. 'header.data' => \App\Http\Middleware\Shop\HeaderData::class,
  70. ];
  71. }