Registry / networking / tomasen-realip

tomasen-realip

JSON →
library0.0.0-20180522021738-f0c99a92ddcegogounverified

A Go package to extract the real client IP address from HTTP requests, considering proxies.

go get github.com/tomasen/realip
INSTALL
IMPORT
SIG · TOMASEN-REALIP
T
tomasen-realip
networkinggov0.0.0-20180522021738-f0c99a92ddce
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

realip
✓ github.com/tomasen/realip

Get the real IP from an HTTP request

package main import ( "fmt" "net/http" "github.com/tomasen/realip" ) func handler(w http.ResponseWriter, r *http.Request) { fmt.Fprintf(w, "Your IP is: %s", realip.FromRequest(r)) } func main() { http.HandleFunc("/", handler) http.ListenAndServe(":8080", nil) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.0.0-20180522021738-f0c99a92ddcelatest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
19 hits · last 30 days
node
18
OpenAI (training)
1
Resources
tomasen-realip — go get tomasen-realip · libregistry