From a4d65a66876f68ec8f93d9c32e30cf456e6885cb Mon Sep 17 00:00:00 2001 From: svemagie <869694+svemagie@users.noreply.github.com> Date: Sun, 3 May 2026 13:25:17 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20youtubeChannel=20wrong=20mount=20path=20?= =?UTF-8?q?/youtubeapi=20=E2=86=92=20/youtube?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Endpoint is configured with mountPath: '/youtube' in indiekit.config.mjs. Data file hardcoded /youtubeapi which was never matched → fell through to auth middleware → 302 redirect. Uses YOUTUBE_MOUNT_PATH env var (default /youtube) for future flexibility. --- _data/youtubeChannel.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/_data/youtubeChannel.js b/_data/youtubeChannel.js index 97d0e94..8a01177 100644 --- a/_data/youtubeChannel.js +++ b/_data/youtubeChannel.js @@ -7,13 +7,14 @@ import { cachedFetch } from "../lib/data-fetch.js"; const INDIEKIT_URL = process.env.INDIEKIT_URL || process.env.SITE_URL || "https://example.com"; +const YOUTUBE_MOUNT = process.env.YOUTUBE_MOUNT_PATH || "/youtube"; /** * Fetch from Indiekit's public YouTube API endpoint */ async function fetchFromIndiekit(endpoint) { try { - const url = `${INDIEKIT_URL}/youtubeapi/api/${endpoint}`; + const url = `${INDIEKIT_URL}${YOUTUBE_MOUNT}/api/${endpoint}`; console.log(`[youtubeChannel] Fetching from Indiekit: ${url}`); const data = await cachedFetch(url, { duration: "5m",