<?php
namespace MasterFFL\Checkout\Subscriber;
use Shopware\Storefront\Framework\Csrf\CsrfRouteMatcher\CsrfRouteMatcherEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class CsrfExclusionSubscriber implements EventSubscriberInterface
{
public static function getSubscribedEvents(): array
{
// ‼ must match the method name exactly
return [CsrfRouteMatcherEvent::class => 'onCsrfRouteMatcher'];
}
public function onCsrfRouteMatcher(CsrfRouteMatcherEvent $event): void
{
// ‼ route name must be identical to debug:router output
$event->addExcludedRoute('frontend.ffl.clear.dealer.address');
}
}