<?php
namespace App\EventListener;
use Pimcore\Bundle\AdminBundle\Security\CsrfProtectionHandler;
use Pimcore\Http\Request\Resolver\PimcoreContextResolver;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\Event\RequestEvent;
use Symfony\Component\HttpKernel\KernelEvents;
use Pimcore\Bundle\CoreBundle\EventListener\Traits\PimcoreContextAwareTrait;
class CsrfDisabler implements EventSubscriberInterface
{
use PimcoreContextAwareTrait;
protected $csrfProtectionHandler;
public function __construct(CsrfProtectionHandler $csrfProtectionHandler)
{
$this->csrfProtectionHandler = $csrfProtectionHandler;
}
public static function getSubscribedEvents(): array
{
return [
KernelEvents::REQUEST => ['handleRequest', 11],
];
}
public function handleRequest(RequestEvent $event)
{
return;
}
}