MCPcopy Create free account
hub / github.com/ericls/imgdd / ExtractIPDirect

Function ExtractIPDirect

httpserver/ip.go:9–12  ·  view source on GitHub ↗
(req *http.Request)

Source from the content-addressed store, hash-verified

7)
8
9func ExtractIPDirect(req *http.Request) string {
10 h, _, _ := net.SplitHostPort(req.RemoteAddr)
11 return h
12}
13
14func ExtractIPXFF(req *http.Request) string {
15 xffIps := req.Header["X-Forwarded-For"]

Callers 1

ExtractIPFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected