From 7f46d6bf9e0ed8458c094c32821b1b4987bfc7db Mon Sep 17 00:00:00 2001 From: Jiri Spilka Date: Mon, 1 Sep 2025 11:57:53 +0200 Subject: [PATCH 1/2] fix: Add accept headers to silence 401 Unauthorized error --- apify-docs-theme/static/js/custom.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apify-docs-theme/static/js/custom.js b/apify-docs-theme/static/js/custom.js index 0d91fa981e..148d64585b 100644 --- a/apify-docs-theme/static/js/custom.js +++ b/apify-docs-theme/static/js/custom.js @@ -145,6 +145,9 @@ function clearMcpRedirectCache() { fetch('https://mcp.apify.com/', { method: 'get', cache: 'reload', + headers: { + 'Accept': 'text/html' + } }).then(() => { // Cache cleared successfully }).catch(() => { From c5dc9e9c96d4934acb7920014a98a30241674154 Mon Sep 17 00:00:00 2001 From: Jiri Spilka Date: Mon, 1 Sep 2025 12:02:31 +0200 Subject: [PATCH 2/2] fix: lint --- apify-docs-theme/static/js/custom.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apify-docs-theme/static/js/custom.js b/apify-docs-theme/static/js/custom.js index 148d64585b..af0e36b67e 100644 --- a/apify-docs-theme/static/js/custom.js +++ b/apify-docs-theme/static/js/custom.js @@ -146,8 +146,8 @@ function clearMcpRedirectCache() { method: 'get', cache: 'reload', headers: { - 'Accept': 'text/html' - } + Accept: 'text/html', + }, }).then(() => { // Cache cleared successfully }).catch(() => {