AriStockAI/consul/config/prod/emotion-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
700 B
JSON

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