diff --git a/go.sum b/go.sum index 9b80284..f6431a5 100644 --- a/go.sum +++ b/go.sum @@ -65,6 +65,8 @@ github.com/nextmn/gopacket-srv6 v0.0.7 h1:GXDcb1S91VkC61uEJ6nyIMk34Wu6Wk1LfdoDXy github.com/nextmn/gopacket-srv6 v0.0.7/go.mod h1:d00D3jb/joNiUXxCukaeymKdFL35ey7mmb+vr02MPmg= github.com/nextmn/json-api v0.0.2 h1:Xo18bv+eWPc+BBfjNP5MdA0bWokaupzEGW5kt1BwYxg= github.com/nextmn/json-api v0.0.2/go.mod h1:gi9IhsD+FFg7iEnJaZtEaY1WlZkQ75KBBk0z5FmSJBU= +github.com/nextmn/json-api v0.0.3 h1:COfRvrXsPOnkYTMoEfcX55n2H1dDKJh86AqT8+N6qZo= +github.com/nextmn/json-api v0.0.3/go.mod h1:gi9IhsD+FFg7iEnJaZtEaY1WlZkQ75KBBk0z5FmSJBU= github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= diff --git a/internal/app/setup.go b/internal/app/setup.go index cf55e48..b0650ab 100644 --- a/internal/app/setup.go +++ b/internal/app/setup.go @@ -65,11 +65,12 @@ func (s *Setup) AddTasks() { } else { httpURI = httpURI + s.config.HTTPAddress.String() + ":" + httpPort } + httpAddr := fmt.Sprintf("[%s]:%s", s.config.HTTPAddress, httpPort) // 0.3 http server rr := tasks.NewRulesRegistry() - s.RegisterTask("ctrl.rest-api", tasks.NewHttpServerTask(httpURI, rr)) + s.RegisterTask("ctrl.rest-api", tasks.NewHttpServerTask(httpAddr, rr)) // 0.4 controller registry if s.config.Locator != nil {