consul fixes

This commit is contained in:
Piotr Biernat 2023-07-29 15:11:22 +02:00
parent c8beab76f1
commit 3b73091cfb

View File

@ -61,7 +61,12 @@ func (s *Service) GetID() string {
}
func (s *Service) GetFullAddr() string {
return fmt.Sprintf("https://%s:%d/", s.domain, s.port)
isTLS := s.port == 443
proto := "http"
if isTLS {
proto = "https"
}
return fmt.Sprintf("%s://%s:%d/", proto, s.domain, s.port)
}
func (s *Service) Register() error {