Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kakkokari-gtyih committed Dec 28, 2024
1 parent e99ae2a commit 5ad0fe7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/frontend/vite.config.local-dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 5ad0fe7

Please sign in to comment.