vercel / next.js

The React Framework
https://nextjs.org
MIT License
124.51k stars 26.58k forks source link

ISG with GIP in _app overrides cache-control of ISG page #14244

Open Timer opened 4 years ago

Timer commented 4 years ago

Bug report

When using the unstable_revalidate param with ISG, a header set by _app should never win.

Additional context

From @lfades:

Update: this is currently not the case, SSG finishes the request before it gets to _app.

the custom _app in the Next.js site was setting a header, but that causes an error because the request was sent, this happens in production and with next start, but in dev you don't get any error.

Timer commented 4 years ago

@lfades re-assigned you from internal tracker. Let me know if this is a non-issue anymore!

lfades commented 3 years ago

Here's a reproduction for the bug: https://github.com/lfades/next-issue-14244. You can test it by running yarn build && yarn start and then refreshing the index page.

Very minor issue as no one has been running into it but any PRs to fix it are welcome!