httpbl-8.x-1.x-dev/httpbl.services.yml

httpbl.services.yml
# Services for Httpbl.
# For a list of property definitions...
# @see https://www.drupal.org/docs/8/api/services-and-dependency-injection/structure-of-a-service-file

services:
  # Defines a request evaluation service for httpbl.middleware.
  httpbl.evaluator:
    class: Drupal\httpbl\HttpblEvaluator
    arguments: ['@ban.ip_manager', '@httpbl.logtrapper']

  # Defines a response service for httpbl.middleware.
  httpbl.response:
    class: Drupal\httpbl\HttpblResponse
    arguments: ['@httpbl.logtrapper']

  # Httpbl fallback logger channel.
  logger.channel.httpbl:
    parent: logger.channel_base
    arguments: ['httpbl']

  # Httpbl Log Trapper
  # Arbitration filter that traps httpbl log messages and passes them for
  # logging in accordance to httpbl config settings.
  httpbl.logtrapper:
    class: Drupal\httpbl\Logger\HttpblLogTrapper
    arguments: ['@logger.log_message_parser', '@logger.channel.httpbl']
    lazy: true
    public: false

  # Defines the httpbl.middleware service.
  httpbl.middleware:
    class: Drupal\httpbl\HttpblMiddleware
    arguments: ['@httpbl.evaluator', '@httpbl.response']
    tags:
      - { name: http_middleware, priority: 275, responder: true }
      # Considerations for fine tuning run-time priority for httpbl.middleware:
      #
      # This info only applies when using Httpbl for page checking/blocking.
      #
      # StackMiddleware\PageCache runs at priority 200.
      # ban\BanMiddleware runs at priority 250.
      #
      # Use a higher value than Ban's priority, for instance, 275, if you want a
      # blacklisted and banned host to see the "403 HTTP_FORBIDDEN..." response
      # from Httpbl.  Then Httpbl gets the "last word" in the request response,
      # as shown below:
      #
      # [__CLASS__] => Drupal\httpbl\HttpblMiddleware
      # [httpKernel] => stdClass Object
      #     (
      #         [__CLASS__] => Drupal\ban\BanMiddleware
      #         [httpKernel] => stdClass Object
      #             (
      #                 [__CLASS__] => Drupal\page_cache\StackMiddleware\PageCache
      #                 [httpKernel] => stdClass Object
      #                     (
      #                         [__CLASS__] => Drupal\Core\StackMiddleware\KernelPreHandle
      #                         [httpKernel] => stdClass Object
      #                             (
      #                                 [__CLASS__] => Drupal\Core\StackMiddleware\Session
      #                                 [httpKernel] => stdClass Object
      #                                     (
      #                                         [__CLASS__] => Symfony\Component\HttpKernel\HttpKernel
      #                                         [dispatcher] => Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher
      #                                         [resolver] => Drupal\Core\Controller\ControllerResolver
      #                                         [requestStack] => Symfony\Component\HttpFoundation\RequestStack
      #
      #
      # Otherwise, use a lower value than Ban's priority, for instance 225, if
      # you want a blacklisted and banned host to see the "[IP] has been banned"
      # response from Ban. Then Ban get the "last word" in the request response,
      # as shown below:
      #
      # [__CLASS__] => Drupal\ban\BanMiddleware
      # [httpKernel] => stdClass Object
      #     (
      #         [__CLASS__] => Drupal\httpbl\HttpblMiddleware
      #         [httpKernel] => stdClass Object
      #             (
      #                 [__CLASS__] => Drupal\page_cache\StackMiddleware\PageCache
      #                 [httpKernel] => stdClass Object
      #                     (
      #                         [__CLASS__] => Drupal\Core\StackMiddleware\KernelPreHandle
      #                         [httpKernel] => stdClass Object
      #                             (
      #                                 [__CLASS__] => Drupal\Core\StackMiddleware\Session
      #                                 [httpKernel] => stdClass Object
      #                                     (
      #                                         [__CLASS__] => Symfony\Component\HttpKernel\HttpKernel
      #                                         [dispatcher] => Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher
      #                                         [resolver] => Drupal\Core\Controller\ControllerResolver
      #                                         [requestStack] => Symfony\Component\HttpFoundation\RequestStack

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc