GAE go仅在localhost上提供路径,在域上不提供服务

I am messing around with a small go app for google app engine locally using the appengine sdk.

I have a problem where a path different than root can only be served if I try to hit it using localhost, but not a domain name.

My setup is as follows.

  • home.mydomain.com points to my home ip adress
  • My home router forwards incoming tcp and udp on port 80 to my laptop on port 8080
  • My laptop is running Windows 10
  • My go version is go1.6 windows/amd64

My app.yaml:

application: tasks
version: 1
runtime: go
api_version: go1

handlers:
- url:  /.*
  script: _go_app

Minimum example code:

func init() {
    fileHandler := http.FileServer(http.Dir("../frontend"))

    http.HandleFunc("/loggedout", testHandler)
    http.Handle("/", fileHandler)

    log.Print(http.ListenAndServe(":8080", nil))
}

func testHandler(res http.ResponseWriter, req *http.Request){    
    panic("JUST NEED THIS TO WORK")
}

My symptoms is that if I access localhost:8080/ I get my website, and if I access localhost:8080/loggedout I get the expected panic.
If I access home.mydomain.com/ I get my website, however if I access home.mydomain.com/loggedout the connection just hangs, in chromes network tab it is listed as pending indefinitely.

As Greg pointed out, when I was using goapp I did not need to also call ListenAndServe. To get goapp to listen for requests outside of localhost I also had to add --host "my laptops ip" to the command.