Don't know if something changed, but I was getting this error using the GCloud SDK bundled dev_appserver.py
. (2019-02-03, MacOS Mojave/10.14, Google Cloud SDK 232.0.0) with Go 1.11.
With Go 1.11, binding explicitly to localhost
helps:
host := ""
if os.Getenv("NODE_ENV") == "development" {
host = "localhost"
log.Printf("Binding to 'localhost' only for '%s'", envPurpose)
}
srv := &http.Server{
Handler: r,
Addr: fmt.Sprintf("%s:%s", host, port),
WriteTimeout: 10 * time.Second,
ReadTimeout: 10 * time.Second,
}
log.Fatal(srv.ListenAndServe())
EDIT: But, while this prevented the "deny/allow" popup on the initial start, it didn't help on automatic restarts unless I didn't explicitly declare handlers in the app.yaml
file. Clearly, there's more going on under the hood.
However, with "bare" app.yaml
files, it worked as desired for me.