No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

Filters.php 2.1KB

hace 2 años
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <?php
  2. namespace Config;
  3. use App\Filters\FormularioInicialFilter;
  4. use App\Filters\InicioFilter;
  5. use CodeIgniter\Config\BaseConfig;
  6. use CodeIgniter\Filters\CSRF;
  7. use CodeIgniter\Filters\DebugToolbar;
  8. use CodeIgniter\Filters\Honeypot;
  9. use CodeIgniter\Filters\InvalidChars;
  10. use CodeIgniter\Filters\SecureHeaders;
  11. class Filters extends BaseConfig
  12. {
  13. /**
  14. * Configures aliases for Filter classes to
  15. * make reading things nicer and simpler.
  16. *
  17. * @var array
  18. */
  19. public $aliases = [
  20. 'csrf' => CSRF::class,
  21. 'toolbar' => DebugToolbar::class,
  22. 'honeypot' => Honeypot::class,
  23. 'invalidchars' => InvalidChars::class,
  24. 'secureheaders' => SecureHeaders::class,
  25. 'login' => \Myth\Auth\Filters\LoginFilter::class,
  26. 'inicio' => InicioFilter::class,
  27. 'formulario_inicial' => FormularioInicialFilter::class,
  28. ];
  29. /**
  30. * List of filter aliases that are always
  31. * applied before and after every request.
  32. *
  33. * @var array
  34. */
  35. public $globals = [
  36. 'before' => [
  37. // 'honeypot',
  38. // 'csrf',
  39. // 'invalidchars',
  40. 'login'
  41. ],
  42. 'after' => [
  43. 'toolbar',
  44. // 'honeypot',
  45. // 'secureheaders',
  46. ],
  47. ];
  48. /**
  49. * List of filter aliases that works on a
  50. * particular HTTP method (GET, POST, etc.).
  51. *
  52. * Example:
  53. * 'post' => ['foo', 'bar']
  54. *
  55. * If you use this, you should disable auto-routing because auto-routing
  56. * permits any HTTP method to access a controller. Accessing the controller
  57. * with a method you don’t expect could bypass the filter.
  58. *
  59. * @var array
  60. */
  61. public $methods = [
  62. 'post' => ['csrf'],
  63. ];
  64. /**
  65. * List of filter aliases that should run on any
  66. * before or after URI patterns.
  67. *
  68. * Example:
  69. * 'isLoggedIn' => ['before' => ['account/*', 'profiles/*']]
  70. *
  71. * @var array
  72. */
  73. public $filters = [
  74. 'inicio' => ['before' => ['/', '/horas']],
  75. 'formulario_inicial' => ['before' => ['registro/']]
  76. ];
  77. }