mirror of
https://github.com/LBRYFoundation/tracker.git
synced 2025-08-23 17:47:29 +00:00
Read RealIP header from the request header map
This commit is contained in:
parent
98542c0ff1
commit
d5da5daa88
1 changed files with 1 additions and 1 deletions
|
@ -143,7 +143,7 @@ func requestedIP(q *query.Query, r *http.Request, cfg *config.NetConfig) (v4, v6
|
||||||
}
|
}
|
||||||
|
|
||||||
if cfg.RealIPHeader != "" {
|
if cfg.RealIPHeader != "" {
|
||||||
if xRealIPs, ok := q.Params[cfg.RealIPHeader]; ok {
|
if xRealIPs, ok := r.Header[cfg.RealIPHeader]; ok {
|
||||||
if v4, v6, done = getIPs(string(xRealIPs[0]), v4, v6, cfg); done {
|
if v4, v6, done = getIPs(string(xRealIPs[0]), v4, v6, cfg); done {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue