Commit 0018ea09 authored by mglaman's avatar mglaman Committed by bojanz

Issue #2838472 by mglaman: Do not allow NeedsRedirectException to be cached (#585)

parent 6a59dc08
......@@ -3,6 +3,7 @@
namespace Drupal\commerce\Response;
use Drupal\Component\Utility\UrlHelper;
use Drupal\Core\Cache\CacheableMetadata;
use Drupal\Core\Form\EnforcedResponseException;
use Drupal\Core\Routing\TrustedRedirectResponse;
......@@ -28,7 +29,11 @@ class NeedsRedirectException extends EnforcedResponseException {
throw new \InvalidArgumentException('Invalid URL provided.');
parent::__construct(new TrustedRedirectResponse($url, $status_code, $headers));
$response = new TrustedRedirectResponse($url, $status_code, $headers);
$cacheable_metadata = new CacheableMetadata();
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment