我正在尝试划分微服务及其身份验证。
演示配置如下:
[frontends]
[frontends.frontend1]
entryPoints = ["http"]
backend = "rancher1"
passHostHeader = true
forwardAuth = "http://127.0.0.1:8090"
[frontends.frontend1.routes.test_1]
rule = "PathPrefixStrip:/order"
[frontends.rancher2]
backend = "rancher2"
passHostHeader = true
[frontends.rancher2.routes.test_1]
rule = "PathPrefixStrip:/test"
如何将forwardAuth应用于frontends.frontend1
答案 0 :(得分:0)
感谢Daniel他帮助了我。
所以,这真的很容易做到:
使您的配置像这样:
[frontends.service]
backend = "service"
passHostHeader = true
[frontends.ordersWorker.auth.forward]
address = "http://127.0.0.1:8090"