From 2374d2ae0f7b684446e89b254ad0de32d6a7d303 Mon Sep 17 00:00:00 2001 From: "me@jeffersonbledsoe.com" Date: Fri, 29 Nov 2024 10:44:09 +0000 Subject: [PATCH] Fix server redirect for external URLs --- packages/volto/src/components/theme/View/LinkView.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/volto/src/components/theme/View/LinkView.jsx b/packages/volto/src/components/theme/View/LinkView.jsx index 8662c2179e..542e5d05c2 100644 --- a/packages/volto/src/components/theme/View/LinkView.jsx +++ b/packages/volto/src/components/theme/View/LinkView.jsx @@ -8,10 +8,11 @@ import { Container as SemanticContainer } from 'semantic-ui-react'; const LinkView = ({ token, content }) => { if (!token && content.remoteUrl) { - if (isInternalURL(content.remoteUrl)) { + // React router can handle all redirects except for client-side to an external URL. + if (isInternalURL(content.remoteUrl) || __SERVER__) { return ; } - window.location.href = flattenToAppURL(content.remoteUrl); + window.location.href = content.remoteUrl; return null; } const { title, description, remoteUrl } = content;