mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
The FE-host rule matched PathPrefix(`/v1/`) at priority 10000 and sent it to the Go indexer, which owns no such path — so the frontend's OWN server routes (/v1/pchain, /v1/config, /v1/csrf, /v1/proxy, /v1/tokens/*) were answered by Go's plain-text "404 page not found". /v1/pchain is where the validators page reads platform.getCurrentValidators, so the page rendered 0 validators / 0 LUX staked against a chain holding 5 validators and 2,500,000,000 LUX. Measured: POST /v1/pchain was 404 through the ingress and 200 straight at the FE pod. One concern per host now. The FE host keeps only /health and the brand SVGs on the Go binary; everything else is the frontend. On the API host the inverse: PathPrefix(`/v1/`) is served verbatim rather than enumerating four of its prefixes, which had left the Blockscout stats surface (/v1/counters, /v1/lines, /v1/pages/*) falling into the catch-all and being rewritten to /v1/indexer/cchain/v1/counters -> 404. Drops mainpage-rewrite: the Go binary serves /main-page/* verbatim, so rewriting it to /homepage/* 404s the homepage widgets. Co-authored-by: Hanzo Dev <[email protected]>
155 lines
7.5 KiB
YAML
155 lines
7.5 KiB
YAML
---
|
|
# Lux Mainnet: explore.lux.network + explorer.lux.network → explore-fe-lux + Go binary API
|
|
apiVersion: hanzo.ai/v1alpha1
|
|
kind: IngressRoute
|
|
metadata:
|
|
name: lux-explorer-mainnet
|
|
namespace: lux-mainnet
|
|
labels: {app: lux-explorer, network: mainnet}
|
|
spec:
|
|
entryPoints: [websecure]
|
|
tls: {certResolver: letsencrypt}
|
|
routes:
|
|
# Brand assets + health → Go binary (port 8090). Data paths do NOT belong
|
|
# here: `explore.*` is the frontend, `api-explore.*` is the API — one
|
|
# concern per host. A `PathPrefix(/v1/)` term here used to swallow the
|
|
# frontend's OWN server routes (/v1/pchain, /v1/config, /v1/csrf), which
|
|
# 404d and rendered the validators page as 0 validators / 0 LUX staked.
|
|
- kind: Rule
|
|
priority: 10000
|
|
match: (Host(`explore.lux.network`) || Host(`explorer.lux.network`)) && (Path(`/health`) || Path(`/envs.js`) || Path(`/icon.svg`) || Path(`/logo.svg`) || Path(`/icon-zoo.svg`) || Path(`/icon-lux.svg`) || Path(`/logo-zoo.svg`) || Path(`/logo-lux.svg`))
|
|
middlewares: [{name: cors-allow-all}]
|
|
services: [{name: explorer, port: 8090}]
|
|
# Catch-all → per-brand Next.js FE (port 80 → 3000)
|
|
- kind: Rule
|
|
match: Host(`explore.lux.network`) || Host(`explorer.lux.network`)
|
|
services: [{name: explore-fe-lux, port: 80}]
|
|
# api-explore.lux.network — every /v1/* path the Go binary serves verbatim
|
|
# (indexer, explorer, graph, base/realtime, AND the stats surface
|
|
# /v1/counters,/v1/lines,/v1/pages/*). Enumerating four of them left the
|
|
# stats microservice paths falling into the catch-all below, which
|
|
# prefixed them into /v1/indexer/cchain/v1/counters → 404.
|
|
- kind: Rule
|
|
match: (Host(`api-explore.lux.network`) || Host(`api-explorer.lux.network`)) && (PathPrefix(`/v1/`) || Path(`/health`))
|
|
middlewares: [{name: cors-allow-all}]
|
|
services: [{name: explorer, port: 8090}]
|
|
# api-explore.lux.network — catch-all: Blockscout-shaped paths get the
|
|
# /v1/indexer/{slug} prefix. NO mainpage-rewrite: the Go binary serves
|
|
# /main-page/* verbatim, so rewriting it to /homepage/* 404s.
|
|
- kind: Rule
|
|
match: Host(`api-explore.lux.network`) || Host(`api-explorer.lux.network`)
|
|
middlewares: [{name: blockscout-prefix-cchain}, {name: cors-allow-all}]
|
|
services: [{name: explorer, port: 8090}]
|
|
---
|
|
# Lux C-Chain (umbrella → re-uses explore-fe-lux because it IS the Lux primary)
|
|
apiVersion: hanzo.ai/v1alpha1
|
|
kind: IngressRoute
|
|
metadata:
|
|
name: lux-explorer-cchain
|
|
namespace: lux-mainnet
|
|
labels: {app: lux-explorer, chain: cchain, network: mainnet}
|
|
spec:
|
|
entryPoints: [websecure]
|
|
tls: {certResolver: letsencrypt}
|
|
routes:
|
|
- kind: Rule
|
|
priority: 10000
|
|
match: (Host(`explore-cchain.lux.network`) || Host(`explore-c.lux.network`)) && (Path(`/health`) || Path(`/envs.js`) || Path(`/icon.svg`) || Path(`/logo.svg`))
|
|
middlewares: [{name: cors-allow-all}]
|
|
services: [{name: explorer, port: 8090}]
|
|
- kind: Rule
|
|
match: Host(`explore-cchain.lux.network`) || Host(`explore-c.lux.network`)
|
|
services: [{name: explore-fe-lux, port: 80}]
|
|
- kind: Rule
|
|
match: (Host(`api-explore-cchain.lux.network`) || Host(`api-explore-c.lux.network`)) && (PathPrefix(`/v1/`) || Path(`/health`))
|
|
middlewares: [{name: cors-allow-all}]
|
|
services: [{name: explorer, port: 8090}]
|
|
- kind: Rule
|
|
match: Host(`api-explore-cchain.lux.network`) || Host(`api-explore-c.lux.network`)
|
|
middlewares: [{name: blockscout-prefix-cchain}, {name: cors-allow-all}]
|
|
services: [{name: explorer, port: 8090}]
|
|
---
|
|
# Hanzo Mainnet
|
|
apiVersion: hanzo.ai/v1alpha1
|
|
kind: IngressRoute
|
|
metadata:
|
|
name: lux-explorer-hanzo
|
|
namespace: lux-mainnet
|
|
labels: {app: lux-explorer, chain: hanzo, network: mainnet}
|
|
spec:
|
|
entryPoints: [websecure]
|
|
tls: {certResolver: letsencrypt}
|
|
routes:
|
|
- kind: Rule
|
|
priority: 10000
|
|
match: (Host(`explore-hanzo.lux.network`) || Host(`explore.hanzo.network`) || Host(`explore.hanzo.ai`)) && (Path(`/health`) || Path(`/envs.js`) || Path(`/icon.svg`) || Path(`/logo.svg`))
|
|
middlewares: [{name: cors-allow-all}]
|
|
services: [{name: explorer, port: 8090}]
|
|
- kind: Rule
|
|
match: Host(`explore-hanzo.lux.network`) || Host(`explore.hanzo.network`) || Host(`explore.hanzo.ai`)
|
|
services: [{name: explore-fe-hanzo, port: 80}]
|
|
- kind: Rule
|
|
match: (Host(`api-explore-hanzo.lux.network`) || Host(`api-explore.hanzo.network`) || Host(`api-explore.hanzo.ai`)) && (PathPrefix(`/v1/`) || Path(`/health`))
|
|
middlewares: [{name: cors-allow-all}]
|
|
services: [{name: explorer, port: 8090}]
|
|
- kind: Rule
|
|
match: Host(`api-explore-hanzo.lux.network`) || Host(`api-explore.hanzo.network`) || Host(`api-explore.hanzo.ai`)
|
|
middlewares: [{name: blockscout-prefix-hanzo}, {name: cors-allow-all}]
|
|
services: [{name: explorer, port: 8090}]
|
|
---
|
|
# Zoo Mainnet
|
|
apiVersion: hanzo.ai/v1alpha1
|
|
kind: IngressRoute
|
|
metadata:
|
|
name: lux-explorer-zoo
|
|
namespace: lux-mainnet
|
|
labels: {app: lux-explorer, chain: zoo, network: mainnet}
|
|
spec:
|
|
entryPoints: [websecure]
|
|
tls: {certResolver: letsencrypt}
|
|
routes:
|
|
- kind: Rule
|
|
priority: 10000
|
|
match: (Host(`explore-zoo.lux.network`) || Host(`explore.zoo.network`) || Host(`explore.zoo.ngo`) || Host(`explorer.zoo.network`) || Host(`explorer-zoo.lux.network`)) && (Path(`/health`) || Path(`/envs.js`) || Path(`/icon.svg`) || Path(`/logo.svg`) || Path(`/icon-zoo.svg`) || Path(`/logo-zoo.svg`))
|
|
middlewares: [{name: cors-allow-all}]
|
|
services: [{name: explorer, port: 8090}]
|
|
- kind: Rule
|
|
match: Host(`explore-zoo.lux.network`) || Host(`explore.zoo.network`) || Host(`explore.zoo.ngo`) || Host(`explorer.zoo.network`) || Host(`explorer-zoo.lux.network`)
|
|
services: [{name: explore-fe-zoo, port: 80}]
|
|
- kind: Rule
|
|
match: (Host(`api-explore-zoo.lux.network`) || Host(`api-explore.zoo.network`) || Host(`api-explore.zoo.ngo`) || Host(`api-explorer.zoo.network`) || Host(`api-explorer-zoo.lux.network`)) && (PathPrefix(`/v1/`) || Path(`/health`))
|
|
middlewares: [{name: cors-allow-all}]
|
|
services: [{name: explorer, port: 8090}]
|
|
- kind: Rule
|
|
match: Host(`api-explore-zoo.lux.network`) || Host(`api-explore.zoo.network`) || Host(`api-explore.zoo.ngo`) || Host(`api-explorer.zoo.network`) || Host(`api-explorer-zoo.lux.network`)
|
|
middlewares: [{name: blockscout-prefix-zoo}, {name: cors-allow-all}]
|
|
services: [{name: explorer, port: 8090}]
|
|
---
|
|
# Pars Mainnet
|
|
apiVersion: hanzo.ai/v1alpha1
|
|
kind: IngressRoute
|
|
metadata:
|
|
name: lux-explorer-pars
|
|
namespace: lux-mainnet
|
|
labels: {app: lux-explorer, chain: pars, network: mainnet}
|
|
spec:
|
|
entryPoints: [websecure]
|
|
tls: {certResolver: letsencrypt}
|
|
routes:
|
|
- kind: Rule
|
|
priority: 10000
|
|
match: (Host(`explore-pars.lux.network`) || Host(`explore.pars.network`)) && (Path(`/health`) || Path(`/envs.js`) || Path(`/icon.svg`) || Path(`/logo.svg`))
|
|
middlewares: [{name: cors-allow-all}]
|
|
services: [{name: explorer, port: 8090}]
|
|
- kind: Rule
|
|
match: Host(`explore-pars.lux.network`) || Host(`explore.pars.network`)
|
|
services: [{name: explore-fe-pars, port: 80}]
|
|
- kind: Rule
|
|
match: (Host(`api-explore-pars.lux.network`) || Host(`api-explore.pars.network`)) && (PathPrefix(`/v1/`) || Path(`/health`))
|
|
middlewares: [{name: cors-allow-all}]
|
|
services: [{name: explorer, port: 8090}]
|
|
- kind: Rule
|
|
match: Host(`api-explore-pars.lux.network`) || Host(`api-explore.pars.network`)
|
|
middlewares: [{name: blockscout-prefix-pars}, {name: cors-allow-all}]
|
|
services: [{name: explorer, port: 8090}]
|