Compare commits

...

3 Commits

Author SHA1 Message Date
1433b69abe Moar HR 2023-06-28 16:37:18 +02:00
c49ec85b3b update config lib 2023-06-21 20:48:32 +02:00
bdac1d5bc9 update configl lib 2023-06-21 20:45:46 +02:00

View File

@@ -6,6 +6,7 @@ import (
"strconv"
"time"
"git.pbiernat.dev/egommerce/go-api-pkg/config"
consul "github.com/hashicorp/consul/api"
)
@@ -53,7 +54,7 @@ func newClientConfig(serverAddr string) *consul.Config {
}
func (s *Service) GetID() string {
return fmt.Sprintf("%s_%s", s.Name, s.appID)
return fmt.Sprintf("%s:%s", s.Name, s.appID)
}
func (s *Service) GetFullAddr() string {
@@ -153,7 +154,7 @@ func (s *Service) getTags() []string {
"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_" + s.Name + ".plugin.auth.handlerURL="",
"traefik.http.middlewares.auth_" + s.Name + ".plugin.auth.handlerURL=" + config.GetEnv("AUTH_HANDLER_URL", ""),
// "traefik.http.middlewares.auth_" + s.Name + ".forwardauth.authRequestHeaders=Cookie",
// "traefik.http.middlewares.auth_" + s.Name + ".forwardauth.authResponseHeaders=Set-Cookie, Server",
// "traefik.http.middlewares.auth_" + s.Name + ".forwardauth.trustForwardHeader=true",