diff --git a/client/on-demand-entries-client.js b/client/on-demand-entries-client.js index 65ed2c29139..7ace9dd50d7 100644 --- a/client/on-demand-entries-client.js +++ b/client/on-demand-entries-client.js @@ -18,14 +18,14 @@ export default () => { try { const url = `${assetPrefix}/_next/on-demand-entries-ping?page=${Router.pathname}` const res = await fetch(url, { - credentials: 'omit' + credentials: 'same-origin' }) const payload = await res.json() if (payload.invalid) { // Payload can be invalid even if the page is not exists. // So, we need to make sure it's exists before reloading. const pageRes = await fetch(location.href, { - credentials: 'omit' + credentials: 'same-origin' }) if (pageRes.status === 200) { location.reload()