From 7d2c281d1f263c3f331eb81a7574e373475a1db9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Honor=C3=A9=20Hounwanou?= Date: Fri, 7 Apr 2023 21:35:41 -0400 Subject: [PATCH] Add priority for kernel.request event subscriber Added priority for CSRF Validation Subscriber so that it still intercepts Security actions. Ref: https://github.com/dunglas/DunglasAngularCsrfBundle/issues/18 Priority set to 12 because: - LocaleListener 16 - Firewall 8 --- EventSubscriber/KernelEventSubscriber.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EventSubscriber/KernelEventSubscriber.php b/EventSubscriber/KernelEventSubscriber.php index 7a0e12b..513c5b5 100644 --- a/EventSubscriber/KernelEventSubscriber.php +++ b/EventSubscriber/KernelEventSubscriber.php @@ -25,7 +25,7 @@ public function __construct(CsrfRequestEvaluator $csrfRequest) public static function getSubscribedEvents(): array { return [ - KernelEvents::REQUEST => 'onKernelRequest', + KernelEvents::REQUEST => ['onKernelRequest', 12], KernelEvents::RESPONSE => 'onKernelResponse', ]; }