fix(traefik/consul): 统一路径规则语法并更新API路径前缀配置
将Traefik路由规则中的路径语法从反引号(`)改为双引号(")以保持一致性
同时将traefik.yml中的pathPrefix改为pathPrefixes以支持数组格式
This commit is contained in:
parent
cebc343893
commit
6ecb0603bb
@ -9,7 +9,7 @@
|
||||
"id": "data-service-1",
|
||||
"tags": [
|
||||
"traefik.enable=true",
|
||||
"traefik.http.routers.data-service.rule=PathPrefix(`/api/data`)",
|
||||
"traefik.http.routers.data-service.rule=PathPrefix(\"/api/data\")",
|
||||
"traefik.http.routers.data-service.entrypoints=web"
|
||||
],
|
||||
"name": "data-service",
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
"id": "emotion-service-1",
|
||||
"tags": [
|
||||
"traefik.enable=true",
|
||||
"traefik.http.routers.emotion-service.rule=PathPrefix(`/api/emotion`)",
|
||||
"traefik.http.routers.emotion-service.rule=PathPrefix(\"/api/emotion\")",
|
||||
"traefik.http.routers.emotion-service.entrypoints=web"
|
||||
],
|
||||
"name": "emotion-service",
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
"id": "frontend-1",
|
||||
"tags": [
|
||||
"traefik.enable=true",
|
||||
"traefik.http.routers.frontend.rule=PathPrefix(`/frontend`)",
|
||||
"traefik.http.routers.frontend.rule=PathPrefix(\"/frontend\")",
|
||||
"traefik.http.routers.frontend.entrypoints=web"
|
||||
],
|
||||
"name": "frontend",
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
"id": "quant-service-1",
|
||||
"tags": [
|
||||
"traefik.enable=true",
|
||||
"traefik.http.routers.quant-service.rule=PathPrefix(`/api/quant`)",
|
||||
"traefik.http.routers.quant-service.rule=PathPrefix(\"/api/quant\")",
|
||||
"traefik.http.routers.quant-service.entrypoints=web"
|
||||
],
|
||||
"name": "quant-service",
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
"id": "recommend-service-1",
|
||||
"tags": [
|
||||
"traefik.enable=true",
|
||||
"traefik.http.routers.recommend-service.rule=PathPrefix(`/api/recommend`)",
|
||||
"traefik.http.routers.recommend-service.rule=PathPrefix(\"/api/recommend\")",
|
||||
"traefik.http.routers.recommend-service.entrypoints=web"
|
||||
],
|
||||
"name": "recommend-service",
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
"id": "user-service-1",
|
||||
"tags": [
|
||||
"traefik.enable=true",
|
||||
"traefik.http.routers.user-service.rule=PathPrefix(`/api/user`)",
|
||||
"traefik.http.routers.user-service.rule=PathPrefix(\"/api/user\")",
|
||||
"traefik.http.routers.user-service.entrypoints=web"
|
||||
],
|
||||
"name": "user-service",
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
"tags": [
|
||||
"traefik.enable=true",
|
||||
"traefik.http.routers.whoami.entrypoints=web",
|
||||
"traefik.http.routers.whoami.rule=Path(`/whoami`)",
|
||||
"traefik.http.routers.whoami.rule=Path(\"/whoami\")",
|
||||
"traefik.http.services.whoami.loadbalancer.server.port=80"
|
||||
],
|
||||
"address": "whoami",
|
||||
|
||||
@ -12,4 +12,4 @@ providers:
|
||||
api:
|
||||
dashboard: true
|
||||
insecure: true
|
||||
pathPrefix: "/traefik-api"
|
||||
pathPrefixes: ["/traefik-api"]
|
||||
Loading…
Reference in New Issue
Block a user