vektor icon indicating copy to clipboard operation
vektor copied to clipboard

0.0.0.0 or localhost

Open danielledeleo opened this issue 4 years ago • 1 comments

See https://github.com/suborbital/atmo/issues/90

danielledeleo avatar Dec 02 '21 16:12 danielledeleo

I think that the linked issue does not depend on more flexible host configuration from our side, as the current behavior is the most "broad" one (listening on all local addresses).

I think it may be useful for certain specific usecases to allow further customization, but at that point probably it would be better to look into exposing the underlying Go functionality for full flexibility, instead of trying to piece-by-piece re-implement it, as probably for people wanting to change the default behavior multiple addresses, or adjusting timings might be relevant tunable parameters:

From the docs:

More control over the server's behavior is available by creating a custom Server:

s := &http.Server{
	Addr:           ":8080",
	Handler:        myHandler,
	ReadTimeout:    10 * time.Second,
	WriteTimeout:   10 * time.Second,
	MaxHeaderBytes: 1 << 20,
}
log.Fatal(s.ListenAndServe())

flaki avatar Dec 09 '21 21:12 flaki