fix: restore CORS + align frontend with /api/token endpoint

The canonical-architecture rewrite dropped app.use(cors()) and moved the
token route to POST /api/token ({room,identity,name}), but the frontend
still called the old /pods/:id/token — causing "Failed to fetch" in the
browser. Re-add CORS and update fetchPodToken to the new contract.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Kartikeya
2026-06-27 14:53:26 -07:00
parent 48d8ed8aaf
commit 6bf359f4d4
2 changed files with 4 additions and 2 deletions
+2
View File
@@ -1,4 +1,5 @@
import express from 'express';
import cors from 'cors';
import { createServer } from 'node:http';
import { WebSocketServer } from 'ws';
import { AccessToken } from 'livekit-server-sdk';
@@ -8,6 +9,7 @@ import { recordOutcome } from './memory/store.js';
import type { InterventionOutcome } from '@podman/shared';
const app = express();
app.use(cors());
app.use(express.json());
app.get('/health', (_req, res) => res.json({ ok: true }));