How to fix Request validation failed for action “Magento\Framework\App\Action\Forward\Interceptor” for Controller

To controller add Magento\Framework\App\CsrfAwareActionInterface\CsrfAwareActionInterface and
public function createCsrfValidationException(RequestInterface $request): ?InvalidRequestException
{
return null;
}

public function validateForCsrf(RequestInterface $request): ?bool
{
return true;
}

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.