Handle Pages data route skew with deployment id header, take 2 (#89325)
Reapply https://github.com/vercel/next.js/pull/88959
Revert https://github.com/vercel/next.js/pull/89323
Closes PACK-6537
Closes PACK-6756
- Deployment skew (forcing a MPA nav instead of a SPA nav if a deployment happened inbetween) is handled by comparing a header on the client side.
- The other case that used build ids was app router, which was changed to the same approach in https://github.com/vercel/next.js/pull/88855
- Then, when a deployment id is available, make the build id a constant
- Particularly, this makes the rollout of this much easier as the data route paths stay the same (both in Next.js itself as well as in the builder)
If you use `output:export` and set `config.deploymentId` (i.e. enable skew protection) you are still expected to set these headers.