services:
  shield.middleware:
    class: Drupal\shield\ShieldMiddleware
    arguments:
      - '@config.factory'
      - '@entity_type.manager'
      - '@path.matcher'
      - '@path_alias.manager'
      - '@language_manager'
      - '@module_handler'
      - '@request_stack'
    tags:
      # Ensure to come before page caching, so you don't serve cached pages to
      # banned users.
      - { name: http_middleware, priority: 250 }
  shield.response_subscriber:
    class: Drupal\shield\EventSubscriber\ShieldSubscriber
    arguments: ['@config.factory']
    tags:
      - { name: event_subscriber }
