From 1fc0a40836205b25d1e5507f2c23b6ec75523fb7 Mon Sep 17 00:00:00 2001 From: "ivan.aksamentov" Date: Thu, 8 Mar 2018 08:25:13 +0100 Subject: [PATCH] Send credentials with on-demand-entries-ping again --- client/on-demand-entries-client.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/on-demand-entries-client.js b/client/on-demand-entries-client.js index 65ed2c291398..7ace9dd50d7d 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()