molecule-core/canvas/src
Hongming Wang 25bd9241d1 fix(tenant): WebSocket URL derivation + AdminAuth same-origin for tenant image
Two bugs on the combined tenant image (canvas + API same-origin):

1. WebSocket URL: NEXT_PUBLIC_WS_URL="" (empty string for same-origin)
   was preserved by ?? operator, producing an invalid WS URL. Now derives
   from window.location when both env vars are empty. Same fix applied
   to TerminalTab.

2. AdminAuth blocking canvas: same-origin requests have no Origin header,
   so neither AdminAuth nor CanvasOrBearer could authenticate the canvas.
   Added isSameOriginCanvas() that checks Referer against request Host,
   gated behind CANVAS_PROXY_URL (only active on tenant image). This
   lets the canvas create/list workspaces, view events, etc. without a
   bearer token when served from the same Go process.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 08:43:01 -07:00
..
__tests__ fix(canvas): address all code review findings on PR #482 2026-04-16 07:48:47 -07:00
app Merge pull request #251 from Molecule-AI/feat/cookie-consent-banner 2026-04-15 13:49:53 -07:00
components fix(tenant): WebSocket URL derivation + AdminAuth same-origin for tenant image 2026-04-16 08:43:01 -07:00
hooks initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
lib fix(canvas): address all code review findings on PR #482 2026-04-16 07:48:47 -07:00
store fix(tenant): WebSocket URL derivation + AdminAuth same-origin for tenant image 2026-04-16 08:43:01 -07:00
stores initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
styles fix(canvas): C1/C2/C3/C5 dark-theme CSS and ReactFlow colorMode 2026-04-16 10:45:16 +00:00
types initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
middleware.ts initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00