AriStockAI/consul/config/prod/user-service.json
fanfpy a44ac35f39 feat(traefik): 添加HTTPS支持并更新服务路由配置
- 在traefik配置中添加TLS证书支持
- 开放443端口用于HTTPS通信
- 更新各微服务的路由规则,使用PathPrefix代替Host匹配
- 为API路由添加路径前缀剥离中间件
- 添加SSL证书文件到项目
2025-07-17 09:56:02 +08:00

20 lines
657 B
JSON

{
"service": {
"address": "user-service",
"check": {
"http": "http://user-service:8004/health",
"interval": "10s",
"timeout": "5s"
},
"id": "user-service-1",
"tags": [
"traefik.enable=true",
"traefik.http.routers.user-service.rule=PathPrefix(`/api/user`) || PathPrefix(`/api/auth`)",
"traefik.http.routers.user-service.entrypoints=web",
"traefik.http.middlewares.user-service-stripprefix.stripprefix.prefixes=/api/user,/api/auth",
"traefik.http.routers.user-service.middlewares=user-service-stripprefix@consulcatalog"
],
"name": "user-service",
"port": 8004
}
}