Files
zeekayandHanzo AI 9ba7de8af5 bridge: carry CORS on the route that serves the host
bridge-api answers browsers on other origins — the Lux Cloud console reads
/health to report signer status — but the k8s Ingress that actually serves
bridge-api.lux.network carried no CORS, so every such read failed preflight.
The bridge-cors middleware already existed and was only bound to a parallel
IngressRoute. Bind it to the Ingress and name lux.cloud among the origins.

Co-authored-by: Hanzo Dev <[email protected]>
2026-08-28 12:38:24 -07:00

121 lines
3.0 KiB
YAML

# k8s Ingress (class: ingress = hanzoai/ingress) — AUTHORITATIVE bridge host routing.
# Zoo + Pars repointed to per-tenant white-labeled deployments (see tenant-bridges.yaml).
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
# bridge-server answers browsers on other origins (the Lux Cloud console reads
# /health to show signer status), so the CORS headers ride the route that
# actually serves the host. bridge-cors names the permitted origins.
ingress.kubernetes.io/router.middlewares: lux-bridge-bridge-cors@kubernetescrd
name: bridge-ingress
namespace: lux-bridge
spec:
ingressClassName: ingress
rules:
- host: bridge.lux.network
http:
paths:
- backend:
service:
name: lux-bridge
port:
number: 80
path: /
pathType: Prefix
- host: bridge-api.lux.network
http:
paths:
- backend:
service:
name: bridge-server
port:
number: 3000
path: /
pathType: Prefix
- host: bridge.pars.network
http:
paths:
# Same-origin /api → shared bridge backend. A longer Prefix wins over "/",
# so /api/* reaches bridge-server while the SPA serves everything else.
# The tenant UI sets BRIDGE_API_HOST to its own origin → no cross-brand
# call to bridge-api.lux.network, no CORS.
- backend:
service:
name: bridge-server
port:
number: 3000
path: /api
pathType: Prefix
- backend:
service:
name: pars-bridge
port:
number: 80
path: /
pathType: Prefix
- host: bridge.hanzo.ai
http:
paths:
- backend:
service:
name: bridge-ui
port:
number: 80
path: /
pathType: Prefix
- host: bridge.zoo.ngo
http:
paths:
- backend:
service:
name: bridge-server
port:
number: 3000
path: /api
pathType: Prefix
- backend:
service:
name: zoo-bridge
port:
number: 80
path: /
pathType: Prefix
- host: bridge.zoo.network
http:
paths:
- backend:
service:
name: bridge-server
port:
number: 3000
path: /api
pathType: Prefix
- backend:
service:
name: zoo-bridge
port:
number: 80
path: /
pathType: Prefix
tls:
- hosts:
- bridge.lux.network
- bridge-api.lux.network
- bridge.zoo.network
secretName: bridge-lux-tls
- hosts:
- bridge.pars.network
- bridge.zoo.network
secretName: bridge-pars-tls
- hosts:
- bridge.hanzo.ai
- bridge.zoo.network
secretName: bridge-hanzo-tls
- hosts:
- bridge.zoo.ngo
- bridge.zoo.network
secretName: bridge-zoo-tls