Filters.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php namespace Config;
  2. use CodeIgniter\Config\BaseConfig;
  3. class Filters extends BaseConfig
  4. {
  5. // Makes reading things below nicer,
  6. // and simpler to change out script that's used.
  7. public $aliases = [
  8. 'csrf' => \CodeIgniter\Filters\CSRF::class,
  9. 'toolbar' => \CodeIgniter\Filters\DebugToolbar::class,
  10. 'honeypot' => \CodeIgniter\Filters\Honeypot::class,
  11. 'myfilter'=> \App\Filters\MyFilter::class,
  12. ];
  13. // Always applied before every request i removed // that was in front of honeypot and csrf below
  14. public $globals = [
  15. 'before' => [
  16. 'honeypot',
  17. 'csrf',
  18. ],
  19. 'after' => [
  20. 'toolbar',
  21. //'honeypot'
  22. ],
  23. ];
  24. // Works on all of a particular HTTP method
  25. // (GET, POST, etc) as BEFORE filters only
  26. // like: 'post' => ['CSRF', 'throttle'],
  27. public $methods = [];
  28. // List filter aliases and any before/after uri patterns
  29. // that they should run on, like:
  30. // 'isLoggedIn' => ['before' => ['account/*', 'profiles/*']],
  31. public $filters = [ 'myfilter' => ['before' => ['removeProduct','editOneProduct','editProducts','addProduct','newblog','editBlogs','removeBlog','addGallery','delGallery','admin' ]]];
  32. }