Skip to content

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

@ch1lam

Description

@ch1lam

Description

The CORS origin regex in packages/opencode/src/server/middleware.ts still matches opencode.ai instead of mimo.xiaomi.com. After the rebrand, the web UI and desktop app hosted on mimo.xiaomi.com cannot make cross-origin requests to the server because the CORS check rejects their origin.

Current behavior

if (/^https:\/\/([a-z0-9-]+\.)*opencode\.ai$/.test(input)) return input

Expected behavior

if (/^https:\/\/([a-z0-9-]+\.)*mimo\.xiaomi\.com$/.test(input)) return input

Fix

#139

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions