我尝试运行traefik(使用docker&swarm)并使用基本的auth http保护仪表板,如下所示:
traefik:
image: traefik:v1.7
deploy:
# ...
labels:
- traefik.frontend.rule=Host:foo.bar.baz
- traefik.enable=true
- traefik.port=8080
- traefik.redirectorservice.frontend.entryPoints=http
- traefik.redirectorservice.frontend.redirect.entryPoint=https
- traefik.webservice.frontend.entryPoints=https
- traefik.frontend.auth.basic.users=user:password
volumes:
- /var/run/docker.sock:/var/run/docker.sock
command: >
--docker
# -...
--api
--api.statistics.recenterrors=25
效果很好,但是当我处于 HEALTH (在foo.bar.baz / dashboard / status上)时,我看到了那些401(来自Traefik本人):
任何想法如何正确解决此问题? 谢谢
PS:有关更多详细信息:https://community.containo.us/t/401-on-traefik-dashboard-health-because-of-basic-auth-http/826