From 5ad0fe70a12a95588f232b4a1f46453b176efd56 Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Sat, 28 Dec 2024 18:09:18 +0900 Subject: [PATCH] fix --- packages/frontend/vite.config.local-dev.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/frontend/vite.config.local-dev.ts b/packages/frontend/vite.config.local-dev.ts index 922fb45995..54eb6ac0b0 100644 --- a/packages/frontend/vite.config.local-dev.ts +++ b/packages/frontend/vite.config.local-dev.ts @@ -17,9 +17,12 @@ const httpUrl = `http://localhost:${port}/`; const websocketUrl = `ws://localhost:${port}/`; const embedUrl = `http://localhost:5174/`; -// activitypubリクエストはProxyを通し、それ以外はViteの開発サーバーを返す +// activitypubリクエスト・streaming用のノートはProxyを通し、それ以外はViteの開発サーバーを返す function varyHandler(req: IncomingMessage) { - if (req.headers.accept?.includes('application/activity+json')) { + if ( + req.headers.accept?.includes('application/activity+json') || + /notes\/[A-Za-z0-9-]+\.json$/.test(req.url ?? '') + ) { return null; } return '/index.html';