From f858bc1697bdc287b5376110de88de617916783b Mon Sep 17 00:00:00 2001 From: Piotr Biernat Date: Tue, 28 Feb 2023 02:45:35 +0100 Subject: [PATCH] fix traefik auth plugin base config --- consul/discovery.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/consul/discovery.go b/consul/discovery.go index dcf4ad4..bc7dac0 100644 --- a/consul/discovery.go +++ b/consul/discovery.go @@ -151,13 +151,13 @@ func (s *Service) getTags() []string { "traefik.http.routers." + s.Name + ".entryPoints=https", "traefik.http.routers." + s.Name + ".tls=true", "traefik.http.routers." + s.Name + ".service=" + s.Name, - "traefik.http.routers." + s.Name + ".middlewares=requestid,stripprefix_" + s.Name, + "traefik.http.routers." + s.Name + ".middlewares=auth,requestid,stripprefix_" + s.Name, "traefik.http.services." + s.Name + ".loadbalancer.server.scheme=http", "traefik.http.services." + s.Name + ".loadbalancer.server.port=" + strconv.Itoa(s.port), "traefik.http.services." + s.Name + ".loadbalancer.passhostheader=false", - // "traefik.http.middlewares.auth.forwardauth.address=http://identity-svc/api/v1/traefik", - // "traefik.http.middlewares.auth.forwardauth.authResponseHeaders=Set-Cookie,Server", - // "traefik.http.middlewares.auth.forwardauth.trustForwardHeader=true", + "traefik.http.middlewares.auth.forwardauth.address=http://identity-svc/api/v1/traefik", + "traefik.http.middlewares.auth.forwardauth.authResponseHeaders=Set-Cookie, Server", + "traefik.http.middlewares.auth.forwardauth.trustForwardHeader=true", "traefik.http.middlewares.requestid.plugin.requestid.headerName=X-Request-ID", "traefik.http.middlewares.stripprefix_" + s.Name + ".stripprefix.prefixes=" + s.pathPrefix, "traefik.tls.certificates.certfile=/certs/client.cert",