You are here

httpbl.services.yml in http:BL 8

File

httpbl.services.yml
View source
  1. # Services for Httpbl.
  2. # For a list of property definitions...
  3. # @see https://www.drupal.org/docs/8/api/services-and-dependency-injection/structure-of-a-service-file
  4. services:
  5. # Defines a request evaluation service for httpbl.middleware.
  6. httpbl.evaluator:
  7. class: Drupal\httpbl\HttpblEvaluator
  8. arguments: ['@ban.ip_manager', '@httpbl.logtrapper']
  9. # Defines a response service for httpbl.middleware.
  10. httpbl.response:
  11. class: Drupal\httpbl\HttpblResponse
  12. arguments: ['@httpbl.logtrapper']
  13. # Httpbl fallback logger channel.
  14. logger.channel.httpbl:
  15. parent: logger.channel_base
  16. arguments: ['httpbl']
  17. # Httpbl Log Trapper
  18. # Arbitration filter that traps httpbl log messages and passes them for
  19. # logging in accordance to httpbl config settings.
  20. httpbl.logtrapper:
  21. class: Drupal\httpbl\Logger\HttpblLogTrapper
  22. arguments: ['@logger.log_message_parser', '@logger.channel.httpbl']
  23. lazy: true
  24. public: false
  25. # Defines the httpbl.middleware service.
  26. httpbl.middleware:
  27. class: Drupal\httpbl\HttpblMiddleware
  28. arguments: ['@httpbl.evaluator', '@httpbl.response']
  29. tags:
  30. - { name: http_middleware, priority: 275, responder: true }
  31. # Considerations for fine tuning run-time priority for httpbl.middleware:
  32. #
  33. # This info only applies when using Httpbl for page checking/blocking.
  34. #
  35. # StackMiddleware\PageCache runs at priority 200.
  36. # ban\BanMiddleware runs at priority 250.
  37. #
  38. # Use a higher value than Ban's priority, for instance, 275, if you want a
  39. # blacklisted and banned host to see the "403 HTTP_FORBIDDEN..." response
  40. # from Httpbl. Then Httpbl gets the "last word" in the request response,
  41. # as shown below:
  42. #
  43. # [__CLASS__] => Drupal\httpbl\HttpblMiddleware
  44. # [httpKernel] => stdClass Object
  45. # (
  46. # [__CLASS__] => Drupal\ban\BanMiddleware
  47. # [httpKernel] => stdClass Object
  48. # (
  49. # [__CLASS__] => Drupal\page_cache\StackMiddleware\PageCache
  50. # [httpKernel] => stdClass Object
  51. # (
  52. # [__CLASS__] => Drupal\Core\StackMiddleware\KernelPreHandle
  53. # [httpKernel] => stdClass Object
  54. # (
  55. # [__CLASS__] => Drupal\Core\StackMiddleware\Session
  56. # [httpKernel] => stdClass Object
  57. # (
  58. # [__CLASS__] => Symfony\Component\HttpKernel\HttpKernel
  59. # [dispatcher] => Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher
  60. # [resolver] => Drupal\Core\Controller\ControllerResolver
  61. # [requestStack] => Symfony\Component\HttpFoundation\RequestStack
  62. #
  63. #
  64. # Otherwise, use a lower value than Ban's priority, for instance 225, if
  65. # you want a blacklisted and banned host to see the "[IP] has been banned"
  66. # response from Ban. Then Ban get the "last word" in the request response,
  67. # as shown below:
  68. #
  69. # [__CLASS__] => Drupal\ban\BanMiddleware
  70. # [httpKernel] => stdClass Object
  71. # (
  72. # [__CLASS__] => Drupal\httpbl\HttpblMiddleware
  73. # [httpKernel] => stdClass Object
  74. # (
  75. # [__CLASS__] => Drupal\page_cache\StackMiddleware\PageCache
  76. # [httpKernel] => stdClass Object
  77. # (
  78. # [__CLASS__] => Drupal\Core\StackMiddleware\KernelPreHandle
  79. # [httpKernel] => stdClass Object
  80. # (
  81. # [__CLASS__] => Drupal\Core\StackMiddleware\Session
  82. # [httpKernel] => stdClass Object
  83. # (
  84. # [__CLASS__] => Symfony\Component\HttpKernel\HttpKernel
  85. # [dispatcher] => Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher
  86. # [resolver] => Drupal\Core\Controller\ControllerResolver
  87. # [requestStack] => Symfony\Component\HttpFoundation\RequestStack