From 06225673269201044358788f2a81dbe13912adce Mon Sep 17 00:00:00 2001 From: Martin Trapp <94928215+martrapp@users.noreply.github.com> Date: Fri, 21 Jun 2024 06:58:18 +0200 Subject: [PATCH] Fall back to page reload when redirected to a cross origin URL (#11302) * fall back to page reload when redirected to a cross origin URL * Make redirect work with dynamically assigned ports * undo --- .changeset/small-badgers-juggle.md | 5 +++++ .../view-transitions/src/pages/one.astro | 1 + .../view-transitions/src/pages/redirect.astro | 10 ++++++++++ packages/astro/e2e/view-transitions.test.js | 20 +++++++++++++++++++ packages/astro/src/transitions/router.ts | 8 +++++++- 5 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 .changeset/small-badgers-juggle.md create mode 100644 packages/astro/e2e/fixtures/view-transitions/src/pages/redirect.astro diff --git a/.changeset/small-badgers-juggle.md b/.changeset/small-badgers-juggle.md new file mode 100644 index 0000000000..0f532fdfd1 --- /dev/null +++ b/.changeset/small-badgers-juggle.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Fixes an issue with the view transition router when redirecting to an URL with different origin. diff --git a/packages/astro/e2e/fixtures/view-transitions/src/pages/one.astro b/packages/astro/e2e/fixtures/view-transitions/src/pages/one.astro index 8e34eb5559..4f11cbbc0d 100644 --- a/packages/astro/e2e/fixtures/view-transitions/src/pages/one.astro +++ b/packages/astro/e2e/fixtures/view-transitions/src/pages/one.astro @@ -11,6 +11,7 @@ import Layout from '../components/Layout.astro'; go to top go to redirect 2 go to a redirect external + redirect cross-origin go to undefined page