One weird trick to prevent macOS firewall popup

Discovered by a stay-at-home developer!
This commit is contained in:
Mislav Marohnić 2019-10-09 15:35:11 +02:00
parent d90552454d
commit db0084f623

View file

@ -31,7 +31,7 @@ func main() {
}
code := ""
srv := &http.Server{Addr: fmt.Sprintf(":%d", port)}
srv := &http.Server{Addr: fmt.Sprintf("localhost:%d", port)}
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
rq := r.URL.Query()
code = rq.Get("code")