AriStockAI/consul/config/dev/data-service.json
fanfpy edeb71d74c fix(consul): 为前端和数据服务添加Traefik路由优先级
添加traefik.http.routers.frontend.priority=10和traefik.http.routers.data-service.priority=100配置,确保API请求优先于前端路由处理
2025-07-16 13:41:12 +08:00

21 lines
744 B
JSON

{
"service": {
"address": "data-service",
"check": {
"http": "http://ari-data-service:8000/api/public/stock_bid_ask_em?symbol=000001",
"interval": "10s",
"timeout": "5s"
},
"id": "data-service-1",
"tags": [
"traefik.enable=true",
"traefik.http.routers.data-service.rule=PathPrefix(`/api/data`) || PathPrefix(`/api/public`)",
"traefik.http.routers.data-service.priority=100",
"traefik.http.routers.data-service.entrypoints=web",
"traefik.http.middlewares.data-service-stripprefix.stripprefix.prefixes=/api/data,/api/public",
"traefik.http.routers.data-service.middlewares=data-service-stripprefix@consulcatalog"
],
"name": "data-service",
"port": 8000
}
}