backend server url fix

This commit is contained in:
Piotr Biernat 2022-12-01 09:24:11 +01:00
parent 71379b1729
commit e5786be62b

View File

@ -112,6 +112,7 @@ func (s *Service) check() (bool, error) {
func (s *Service) getTags() []string {
fullName := fmt.Sprintf("%s_%s", s.Name, s.AppID)
bFullAddr := fmt.Sprintf("http://%s:%d", s.IP, s.Port)
tags := []string{
"traefik.enable=true",
@ -122,7 +123,7 @@ func (s *Service) getTags() []string {
"traefik.http.routers." + s.Name + ".tls=true",
// "traefik.http.services." + s.Name + ".loadbalancer.server.scheme=http",
// "traefik.http.services." + s.Name + ".loadbalancer.server.port=" + port,
"traefik.http.services." + s.Name + ".loadbalancer.servers." + fullName + "=" + s.Address,
"traefik.http.services." + s.Name + ".loadbalancer.servers." + fullName + "=" + bFullAddr,
"traefik.http.services." + s.Name + ".loadbalancer.passhostheader=false",
"traefik.http.middlewares.compress.compress=true",
"traefik.http.middlewares.requestid.plugin.requestid.headerName=X-Request-ID",