refactor(traefik): 移除API路径前缀并统一服务路由路径

将Traefik的API自定义路径前缀移除,并统一各服务的路由路径格式,从`/api/service`改为`/api-service`,提高路径一致性
This commit is contained in:
fanfpy 2025-07-02 10:47:22 +08:00
parent f98650118c
commit 3ced301ee1
5 changed files with 5 additions and 6 deletions

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -12,4 +12,3 @@ providers:
api:
dashboard: true
insecure: true
prefix: "/traefik-api" # 自定义 API 路径前缀