From 4011d00a598225817c05583abbbcfc97f34b81d0 Mon Sep 17 00:00:00 2001 From: Utku Demir Date: Thu, 20 Dec 2018 08:54:14 +1300 Subject: [PATCH] Pass credentials on `fetch` call --- src/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/script.js b/src/script.js index 0e6febd..7ef4b80 100755 --- a/src/script.js +++ b/src/script.js @@ -29,7 +29,7 @@ const prevent = e => e.preventDefault() // Soft nav function browseTo (href) { - fetch(href).then(r => r.text().then(t => { + fetch(href, { credentials: 'include' }).then(r => r.text().then(t => { const parsed = new DOMParser().parseFromString(t, 'text/html') const table = parsed.querySelectorAll('table')[0].innerHTML document.body.querySelectorAll('table')[0].innerHTML = table