custom/plugins/MasterFFLCheckout/src/Subscriber/CsrfExclusionSubscriber.php line 16

Open in your IDE?
  1. <?php
  2. namespace MasterFFL\Checkout\Subscriber;
  3. use Shopware\Storefront\Framework\Csrf\CsrfRouteMatcher\CsrfRouteMatcherEvent;
  4. use Symfony\Component\EventDispatcher\EventSubscriberInterface;
  5. class CsrfExclusionSubscriber implements EventSubscriberInterface
  6. {
  7.     public static function getSubscribedEvents(): array
  8.     {
  9.         // ‼ must match the method name exactly
  10.         return [CsrfRouteMatcherEvent::class => 'onCsrfRouteMatcher'];
  11.     }
  12.     public function onCsrfRouteMatcher(CsrfRouteMatcherEvent $event): void
  13.     {
  14.         // ‼ route name must be identical to debug:router output
  15.         $event->addExcludedRoute('frontend.ffl.clear.dealer.address');
  16.     }
  17. }