Skip to content

feat: support US environment via cookie app_id#1173

Merged
twosugar merged 1 commit into
mainfrom
feat/support-us
Jul 20, 2026
Merged

feat: support US environment via cookie app_id#1173
twosugar merged 1 commit into
mainfrom
feat/support-us

Conversation

@twosugar

Copy link
Copy Markdown
Collaborator

Runtime US tenant detection based on cookie app_id / x-original-app-id (longbridge_us / longbridge_us_uat), aligned with openapi-website-private.

  • API baseUrl (request.ts) prefers US host when cookie matches:
    longbridge_us -> https://mr.longbridge.com
    longbridge_us_uat -> https://mr.longbridge-staging.com
    falls back to hostname suffix.
  • API_PROXY_URL resolves the same way in an inline bootstrap script
    that runs before longport-internal.iife.js loads.
  • Append with-us=1 to the login redirect URL.
  • Pin longport-internal.iife.js to versioned CDN artifact that contains
    US tenant normalization
    (assets.lbctrl.com/openapi-sdk/release/longport-internal-202607201728.iife.js).
  • Rename portal gateway host m.* -> mr.* in package.json, region.config.ts,
    config.mts and workflow yml.

Runtime US tenant detection based on cookie `app_id` / `x-original-app-id`
(longbridge_us / longbridge_us_uat), aligned with openapi-website-private.

- API baseUrl (request.ts) prefers US host when cookie matches:
    longbridge_us     -> https://mr.longbridge.com
    longbridge_us_uat -> https://mr.longbridge-staging.com
  falls back to hostname suffix.
- __API_PROXY_URL__ resolves the same way in an inline bootstrap script
  that runs before longport-internal.iife.js loads.
- Append `with-us=1` to the login redirect URL.
- Pin longport-internal.iife.js to versioned CDN artifact that contains
  US tenant normalization
  (assets.lbctrl.com/openapi-sdk/release/longport-internal-202607201728.iife.js).
- Rename portal gateway host m.* -> mr.* in package.json, region.config.ts,
  config.mts and workflow yml.
@twosugar
twosugar merged commit 4d75895 into main Jul 20, 2026
2 checks passed
@twosugar
twosugar deleted the feat/support-us branch July 20, 2026 10:14
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.

1 participant