Closed IgorN closed 4 years ago
hi!
func handle(w http.ResponseWriter, r *http.Request) { fmt.Fprint(w, "Metrix") }
http.HandleFunc("/metrics", handle) - how can I allow this host(for example) for some ip's ?
Thanks!
h := http.HandlerFunc(func handle(w http.ResponseWriter, r *http.Request) { fmt.Fprint(w, "Metrix") }) h = ipfilter.Wrap(h, ipfilter.Options{ ... }) http.HandleFunc("/metrics", h)
See https://godoc.org/github.com/jpillora/ipfilter#Wrap
hi!
func handle(w http.ResponseWriter, r *http.Request) { fmt.Fprint(w, "Metrix") }
http.HandleFunc("/metrics", handle) - how can I allow this host(for example) for some ip's ?
Thanks!