Skip to content

Commit

Permalink
Explicity listen on 0.0.0.0
Browse files Browse the repository at this point in the history
Signed-off-by: Will Fisher <whfisher@alaska.edu>
  • Loading branch information
teknofire committed Feb 29, 2024
1 parent 7101d1d commit dcd68c7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ func main() {
flag.IntVar(&port, "p", 9999, "port to serve on")
flag.Parse()

fmt.Println(port)

target := "http://127.0.0.1:55235"
proxy, err := createReverseProxy(target)
if err != nil {
Expand All @@ -36,5 +34,5 @@ func main() {
http.Handle("/", proxy)

log.Printf("Starting reverse proxy server on port %d, forwarding requests to %s", port, target)
log.Fatal(http.ListenAndServe(fmt.Sprintf(":%d", port), nil))
log.Fatal(http.ListenAndServe(fmt.Sprintf("0.0.0.0:%d", port), nil))
}

0 comments on commit dcd68c7

Please # to comment.