Kernel.php 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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\TrustProxies::class,
  15. \Fruitcake\Cors\HandleCors::class,
  16. \App\Http\Middleware\CheckForMaintenanceMode::class,
  17. \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
  18. \App\Http\Middleware\TrimStrings::class,
  19. \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
  20. ];
  21. /**
  22. * The application's route middleware groups.
  23. *
  24. * @var array
  25. */
  26. protected $middlewareGroups = [
  27. 'web' => [
  28. \App\Http\Middleware\EncryptCookies::class,
  29. \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
  30. \Illuminate\Session\Middleware\StartSession::class,
  31. // \Illuminate\Session\Middleware\AuthenticateSession::class,
  32. \Illuminate\View\Middleware\ShareErrorsFromSession::class,
  33. \App\Http\Middleware\VerifyCsrfToken::class,
  34. \Illuminate\Routing\Middleware\SubstituteBindings::class,
  35. ],
  36. 'api' => [
  37. 'throttle:600,1',
  38. \Illuminate\Routing\Middleware\SubstituteBindings::class,
  39. ],
  40. 'statistics_api' => [
  41. 'throttle:600,1',
  42. \Illuminate\Routing\Middleware\SubstituteBindings::class,
  43. ],
  44. ];
  45. /**
  46. * The application's route middleware.
  47. *
  48. * These middleware may be assigned to groups or used individually.
  49. *
  50. * @var array
  51. */
  52. protected $routeMiddleware = [
  53. 'auth' => \App\Http\Middleware\Authenticate::class,
  54. 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
  55. 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
  56. 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
  57. 'can' => \Illuminate\Auth\Middleware\Authorize::class,
  58. 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
  59. 'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class,
  60. 'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
  61. 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
  62. 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
  63. 'apiSign'=>\App\Http\Middleware\ApiSign::class,
  64. 'token'=>\App\Http\Middleware\CheckToken::class,
  65. 'psy_user'=>\App\Http\Middleware\PsyUserVerify::class,
  66. 'psyUserSso' => \App\Http\Middleware\PsyUserSso::class
  67. ];
  68. }