| Age | Commit message (Collapse) | Author |
|
With help of spdxconv tool [1], we able to bulk update all files license
and copyright format to comply with SPDX formats.
[1] https://kilabit.info/project/spdxconv/
|
|
|
|
Previously, the IPAddressOfRequest accept only one parameter, the
http.Request. This make the function only works on HTTP server from
standard library, not from other library (for example websocket) or
other protocol that use HTTP header too.
This commit changes the parameter to http.Header and default address.
If no headers present, then the default address will be used.
|
|
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.
|