aboutsummaryrefslogtreecommitdiff
path: root/lib/sql
diff options
context:
space:
mode:
authorShulhan <m.shulhan@gmail.com>2021-02-06 17:02:48 +0700
committerShulhan <m.shulhan@gmail.com>2021-02-07 20:22:04 +0700
commit5013fd9b71ce23f9ead93a18c49a5b984d014f39 (patch)
tree0d006dd99970336281ce4f4de34ea9092b2cc6a1 /lib/sql
parentfe80e1e95712fa5a02e855b8575777a284715fee (diff)
downloadpakakeh.go-5013fd9b71ce23f9ead93a18c49a5b984d014f39.tar.xz
http: add methods IPAddressOfRequest and ParseXForwardedFor
The IPAddressOfRequest get the client IP address from HTTP request header "X-Real-IP" or "X-Forwarded-For" or from Request.RemoteAddr, which ever non-empty first. The ParseXForwardedFor parse the HTTP header "X-Forwarded-For" value from the following format "client, proxy1, proxy2" into client address and list of proxy addressess.
Diffstat (limited to 'lib/sql')
0 files changed, 0 insertions, 0 deletions