Files
JJ KasperandGitHub c5336132c3 Fix fetch cache key inputs and encoding (#46392
This ensures we properly filter caching on uncachable request methods by
default and correct encoding handling in edge runtime.

Fixes: https://github.com/vercel/next.js/issues/46349
x-ref: [slack
thread](https://vercel.slack.com/archives/C042LHPJ1NX/p1677253242022489)

## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)
2023-02-24 16:44:47 -08:00

20 lines
392 B
JavaScript

export const runtime = 'experimental-edge'
export default async function Page() {
const data = await fetch(
'https://next-data-api-endpoint.vercel.app/api/utf8-encoding',
{
next: {
revalidate: 3,
},
}
).then((res) => res.text())
return (
<>
<p id="page">/variable-revalidate-edge/encoding</p>
<p id="page-data">{data}</p>
</>
)
}