lura icon indicating copy to clipboard operation
lura copied to clipboard

Add address config option to specify host:port

Open crvcrv opened this issue 5 years ago • 0 comments

Add a config option to specify host:post.
Currently one can only set the port via config option Port just for krakend to use this value as a string.

func NewServer(cfg config.ServiceConfig, handler http.Handler) *http.Server {
	return &http.Server{
		Addr:              fmt.Sprintf(":%d", cfg.Port),
                ...
	}
}

See https://github.com/devopsfaith/krakend/blob/master/transport/http/server/server.go#L107

Solution: Add an Address config option that should bind stronger than Port does so if Port and Address is specified Address is being used.

crvcrv avatar Dec 11 '19 16:12 crvcrv