Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When redirecting pre-rendered pages, Astro serves a "Redirecting to [url]" placeholder #7889

Closed
1 task
paulrudy opened this issue Jul 31, 2023 · 7 comments · Fixed by #8896
Closed
1 task
Assignees
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority) feat: redirects Related to the redirects feature (scope) pkg: vercel Related to Vercel adapter (scope)

Comments

@paulrudy
Copy link
Contributor

paulrudy commented Jul 31, 2023

What version of astro are you using?

2.9.6

Are you using an SSR adapter? If so, which one?

Vercel

What package manager are you using?

pnpm

What operating system are you using?

Mac

What browser are you using?

Chrome, Safari

Describe the Bug

This issue was discussed in #7731 (closed), but has not been resolved for Vercel.

With Astro's redirects configured in SSR mode, but with pre-rendered pages, there is a brief flash of "Redirecting to... [url]" before being served the target url of the redirect.

This happens both in hybrid mode, and in server mode (when the pages being served have export const prerender = true; in their frontmatter). It seems not to happen when the source url for the redirect is /.

What's the expected result?

Redirection of pre-rendered pages in server (or hybrid) mode should happen seamlessly.

Link to Minimal Reproducible Example

Live (navigate to /foo)
repo

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Jul 31, 2023
@natemoo-re
Copy link
Member

Thanks for opening a new issue! Looks like this is another case we missed. We'll take a look at this as soon as we can.

@natemoo-re natemoo-re added pkg: vercel Related to Vercel adapter (scope) feat: redirects Related to the redirects feature (scope) - P4: important Violate documented behavior or significantly impacts performance (priority) labels Aug 1, 2023
@github-actions github-actions bot removed the needs triage Issue needs to be triaged label Aug 1, 2023
@MKlblangenois
Copy link
Contributor

Hey @natemoo-re! Have you any update about this issue ? :)

@maxnowack
Copy link

maxnowack commented Sep 21, 2023

I got around this with the following addition to my config (using the @astrojs/node adapter):

  // ...
  build: {
    redirects: false,
  },
  // ...

@disrae
Copy link

disrae commented Jan 5, 2024

I'm on Astro 4.0.6 and I'm having this issue.

@gregorobreza
Copy link

I have similar issue when deploying on github pages. I am using Astro 4.0.8. It works fine locally but in production It flashes for a brief moment.

@ematipico
Copy link
Member

It's worth opening a new issue with a new reproduction.

@gregorobreza
Copy link

Sure here it is #9662

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority) feat: redirects Related to the redirects feature (scope) pkg: vercel Related to Vercel adapter (scope)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants