- Issue created by @RoSk0
- 🇮🇳India balramchauhan684@gmail.com
Try this code if it works for you.
use Drupal\big_pipe\Render\Placeholder\BigPipeStrategy; use Drupal\Core\Cache\CacheableMetadata; use Drupal\Core\Routing\LocalRedirectResponse; $response = new LocalRedirectResponse(Url::fromRoute('<front>')->toString()); $response->addCacheableDependency((new CacheableMetadata())->addCacheContexts(['cookies:' . BigPipeStrategy::NOJS_COOKIE, 'session.exists'])); return $response;