阅读提及traefik.frontend.auth.basic
的{{3}}和https://github.com/containous/traefik/issues/751我试图为每个traefik前端设置基本身份验证(不是入口点)。
无论
[frontends.kibana]
backend = "kibana"
[frontends.kibana.routes.nas]
rule = "Host:kibana.mydomain.io"
[frontends.kibana.auth]
basic = "kibana:$apr1$cHAIJt0o$..."
也不是
[frontends.kibana]
backend = "kibana"
auth.basic = "kibana:$apr1$cHAIJt0o$..."
[frontends.kibana.routes.nas]
rule = "Host:kibana.mydomain.io"
正在运作。如何在前端级别指定基本身份验证?
答案 0 :(得分:4)
就像那样:
[frontends.kibana]
backend = "kibana"
basicAuth = ["kibana:$apr1...", "anabik:$apr1..."]
[frontends.kibana.routes.nas]
rule = "Host:kibana.mydomain.io"