-
Notifications
You must be signed in to change notification settings - Fork 27k
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
SSG pages with route rewrites request wrong files from _next/data #63199
Comments
This issue probably comes from here, when Next sends "a HEAD request in the background when a non-prefetch request is made to signal revalidation", because the prefetches are fine, but the problem occurs on a client-side navigation (I mean it does not occurs on hard reload) to the page. I tried to add the following to my rewrites and redirects, but it does not solve the problem: {
missing: [
{
type: 'header',
key: 'x-nextjs-data',
},
],
} |
We have a very similar issue. Up until The prefetch (.json) requests are 404 if the page is client-side rendered, but they load fine if SSR. If I open the page via a With the latest |
I've noticed the same issue. Has anyone figured out a workaround? |
The The prefetch (.json) requests are 404 if the prefetched page is client-side rendered, but the prefetch request is fine if SSR. |
Link to the code that reproduces this issue
https://github.com/fmacherey/poc-ssg
To Reproduce
localhost:3000/lexikon/a
Current vs. Expected behavior
You'll see several network requests for the static ssr json files e.g.
The first GET request is fine and correct, but the secondly listed HEAD request leads to a 404 Not Found.
Expected: the HEAD request should not occur or at least going correctly to the internal file "dict/b.json" and not the rewritten path (see next.config)
Provide environment information
Which area(s) are affected? (Select all that apply)
Data fetching (gS(S)P, getInitialProps)
Which stage(s) are affected? (Select all that apply)
next build (local), next start (local)
Additional context
No response
The text was updated successfully, but these errors were encountered: