MCPcopy Create free account
hub / github.com/idank/explainshell / clientIP

Function clientIP

prod/botshed/module.go:259–267  ·  view source on GitHub ↗
(r *http.Request)

Source from the content-addressed store, hash-verified

257}
258
259func clientIP(r *http.Request) string {
260 if v := r.Header.Get("Do-Connecting-Ip"); v != "" {
261 return v
262 }
263 if v := r.Header.Get("CF-Connecting-IP"); v != "" {
264 return v
265 }
266 return r.RemoteAddr
267}
268
269func (b *Botshed) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
270 for d.Next() {

Callers 1

ServeHTTPMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected