Files
zeekayandHanzo Dev a00a67b23b Let the exchange read the bridge
The bridge screen reported every corridor unreachable — Zoo, Ethereum, Arbitrum,
Optimism, Base, Polygon, BNB, Avalanche, Bitcoin, Solana, TON, XRP — with "the
bridge did not answer, failed to fetch". The bridge was answering the whole
time.

bridge.lux.network/v1/bridge/networks returns 200 and JSON to curl. To a browser
it returns 200 and no access-control-allow-origin, because the exchange's origin
is not on this list, and every other CORS header being present makes that easy
to miss: allow-credentials, allow-headers, allow-methods and max-age all come
back, so a preflight looks configured. The one header that decides it is the one
omitted, and its absence is silent — no error, no status, just a response the
browser refuses to hand to the page.

Four origins added: the exchange on mainnet under both names it is served at,
and its testnet and devnet hosts.

Co-authored-by: Hanzo Dev <[email protected]>
2026-09-02 00:28:33 -07:00

91 lines
2.4 KiB
YAML

apiVersion: hanzo.ai/v1alpha1
kind: Middleware
metadata:
name: bridge-cors
namespace: lux-bridge
spec:
headers:
accessControlAllowHeaders:
- Content-Type
- Authorization
- X-Requested-With
accessControlAllowMethods:
- GET
- POST
- OPTIONS
# Every origin that reads the bridge. One missing here is not a refusal a
# caller can see: the gateway answers 200 and omits
# access-control-allow-origin, so curl succeeds, the browser blocks the
# response, and the screen reports the bridge unreachable while the bridge
# is fine. The exchange reads /v1/bridge/networks and was absent.
accessControlAllowOriginList:
- "https://lux.exchange"
- "https://exchange.lux.network"
- "https://exchange.lux-test.network"
- "https://exchange.lux-dev.network"
- "https://bridge.lux.network"
- "https://lux.network"
- "https://lux.cloud"
- "https://wallet.lux.network"
- "https://bridge.pars.network"
- "https://bridge.hanzo.ai"
- "https://bridge.zoo.ngo"
- "https://bridge.zoo.network"
accessControlAllowCredentials: true
accessControlMaxAge: 86400
---
apiVersion: hanzo.ai/v1alpha1
kind: IngressRoute
metadata:
name: lux-bridge
namespace: lux-bridge
labels:
app: lux-bridge
spec:
entryPoints:
- websecure
routes:
- kind: Rule
match: Host(`bridge.lux.network`)
middlewares:
- name: bridge-cors
services:
- name: bridge-ui
port: 3000
- kind: Rule
match: Host(`bridge-api.lux.network`)
middlewares:
- name: bridge-cors
services:
- name: bridge-server
port: 3000
- kind: Rule
match: Host(`bridge.pars.network`)
middlewares:
- name: bridge-cors
services:
- name: bridge-ui
port: 3000
- kind: Rule
match: Host(`bridge.hanzo.ai`)
middlewares:
- name: bridge-cors
services:
- name: bridge-ui
port: 3000
- kind: Rule
match: Host(`bridge.zoo.ngo`)
middlewares:
- name: bridge-cors
services:
- name: bridge-ui
port: 3000
tls:
certResolver: letsencrypt
domains:
- main: bridge.lux.network
- main: bridge-api.lux.network
- main: bridge.pars.network
- main: bridge.hanzo.ai
- main: bridge.zoo.ngo