Skip to content

Commit dcda7e3

Browse files
author
Arne-Christian Blystad
committed
Write remote addr
1 parent 52225d7 commit dcda7e3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

main.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@ package main
22

33
import (
44
"flag"
5+
"fmt"
56
"log"
67
"net/http"
78
"strconv"
89
)
910

1011
func handler(w http.ResponseWriter, r *http.Request) {
1112
r.Write(w)
13+
fmt.Fprintf(w, "RemoteAddr: %s", r.RemoteAddr)
1214
}
1315

1416
func main() {

0 commit comments

Comments
 (0)