From 4fc94500a4ab7c49dd443aa6352e518a3956c098 Mon Sep 17 00:00:00 2001 From: Chris Amico Date: Wed, 6 Dec 2023 10:52:32 -0500 Subject: [PATCH 1/2] Include credentials on FlatPage api calls --- .gitignore | 1 + src/pages/NotFound.svelte | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 7fad13404..0abeca247 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,4 @@ tests/fixtures/development.json .vscode scratch/ +dist/ diff --git a/src/pages/NotFound.svelte b/src/pages/NotFound.svelte index aba10f96a..6666bc04e 100644 --- a/src/pages/NotFound.svelte +++ b/src/pages/NotFound.svelte @@ -28,7 +28,9 @@ async function load() { console.log(`Loading page content: ${endpoint}`); - const resp = await fetch(endpoint); + const resp = await fetch(endpoint, { + credentials: "include", + }); if (!resp.ok) { notFound = true; From ca45368aa3edf83fe97b6ea38fd5866e66e338f9 Mon Sep 17 00:00:00 2001 From: Chris Amico Date: Wed, 6 Dec 2023 10:55:50 -0500 Subject: [PATCH 2/2] console --- src/pages/FlatPage.svelte | 2 +- src/pages/NotFound.svelte | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/pages/FlatPage.svelte b/src/pages/FlatPage.svelte index 5ce6af438..f4a1b15e7 100644 --- a/src/pages/FlatPage.svelte +++ b/src/pages/FlatPage.svelte @@ -49,7 +49,7 @@ function injectLinkReferences() { if (!contentElem) { - console.log("No content element"); + console.warn("No content element"); return; } diff --git a/src/pages/NotFound.svelte b/src/pages/NotFound.svelte index 6666bc04e..2f8f645b7 100644 --- a/src/pages/NotFound.svelte +++ b/src/pages/NotFound.svelte @@ -27,7 +27,6 @@ } async function load() { - console.log(`Loading page content: ${endpoint}`); const resp = await fetch(endpoint, { credentials: "include", });