providers/proxy: fix Traefik label generation for v3 (#10411)

Co-authored-by: Kenneth Huang <kthuang@hotmail.com>
This commit is contained in:
DriftDevil
2024-07-22 08:17:27 -04:00
committed by GitHub
parent fdcf6a1f14
commit 919d5fce39

View File

@ -28,7 +28,8 @@ class ProxyDockerController(DockerController):
labels = super()._get_labels()
labels["traefik.enable"] = "true"
labels[f"traefik.http.routers.{traefik_name}-router.rule"] = (
f"Host({','.join(hosts)}) && PathPrefix(`/outpost.goauthentik.io`)"
f"({' || '.join([f'Host(`{host}`)' for host in hosts])})"
f" && PathPrefix(`/outpost.goauthentik.io`)"
)
labels[f"traefik.http.routers.{traefik_name}-router.tls"] = "true"
labels[f"traefik.http.routers.{traefik_name}-router.service"] = f"{traefik_name}-service"