Skip to content

fix(server): update CORS whitelist from opencode.ai to mimo.xiaomi.com#139

Closed
ch1lam wants to merge 6 commits into
XiaomiMiMo:mainfrom
ch1lam:fix/cors-domain-whitelist
Closed

fix(server): update CORS whitelist from opencode.ai to mimo.xiaomi.com#139
ch1lam wants to merge 6 commits into
XiaomiMiMo:mainfrom
ch1lam:fix/cors-domain-whitelist

Conversation

@ch1lam

@ch1lam ch1lam commented Jun 11, 2026

Copy link
Copy Markdown

Summary

  • Update CORS origin regex from opencode.ai to mimo.xiaomi.com in packages/opencode/src/server/middleware.ts
  • Fixes cross-origin requests from the web UI and desktop app after the rebrand

Motivation

The CORS whitelist still references the old opencode.ai domain. After the rebrand to MiMo Code, the web UI hosted on mimo.xiaomi.com and the Tauri desktop app cannot make cross-origin API requests because the CORS check rejects their origin.

Changes

Before After
/^https:\/\/([a-z0-9-]+\.)*opencode\.ai$/ /^https:\/\/([a-z0-9-]+\.)*mimo\.xiaomi\.com$/

Testing

  • Verified the regex matches https://mimo.xiaomi.com and https://app.mimo.xiaomi.com
  • Verified the regex rejects https://opencode.ai and arbitrary domains

Fixes #137

qiaozongming and others added 6 commits June 11, 2026 01:23
docs: correct OpenCode repository URL in README files
The CORS origin regex still referenced the old opencode.ai domain after
the rebrand to MiMo Code. Update to mimo.xiaomi.com so the web UI and
desktop app can make cross-origin requests to the server.
@qiaozongming

Copy link
Copy Markdown
Collaborator

#949

@qiaozongming

Copy link
Copy Markdown
Collaborator

#1112

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(server): CORS whitelist still references opencode.ai after rebrand

5 participants