diff --git a/packages/frontend/vite.config.local-dev.ts b/packages/frontend/vite.config.local-dev.ts index 922fb459958f..54eb6ac0b059 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';