- 在traefik配置中添加TLS证书支持 - 开放443端口用于HTTPS通信 - 更新各微服务的路由规则,使用PathPrefix代替Host匹配 - 为API路由添加路径前缀剥离中间件 - 添加SSL证书文件到项目
26 lines
457 B
YAML
26 lines
457 B
YAML
entryPoints:
|
|
web:
|
|
address: ":80"
|
|
http:
|
|
redirections:
|
|
entryPoint:
|
|
to: websecure
|
|
scheme: https
|
|
websecure:
|
|
address: ":443"
|
|
http:
|
|
tls:
|
|
certificates:
|
|
- certFile: /etc/traefik/certs/cert.pem
|
|
keyFile: /etc/traefik/certs/key.pem
|
|
|
|
|
|
providers:
|
|
consulCatalog:
|
|
endpoint:
|
|
address: "ari-consul:8500"
|
|
exposedByDefault: false
|
|
|
|
api:
|
|
dashboard: true
|
|
insecure: false |