mirror of
https://github.com/eolinker/apinto
synced 2025-10-23 16:53:18 +08:00
解决real ip
This commit is contained in:
@@ -51,9 +51,10 @@ func (r *ProxyRequest) reset(request *fasthttp.Request, remoteAddr string) {
|
||||
r.req.Header.Set("x-forwarded-for", fmt.Sprint(string(forwardedFor), ",", remoteAddr))
|
||||
} else {
|
||||
r.req.Header.Set("x-forwarded-for", remoteAddr)
|
||||
|
||||
}
|
||||
|
||||
r.req.Header.Set("x-real-ip", r.RequestReader.realIP)
|
||||
|
||||
}
|
||||
|
||||
//func NewProxyRequest(request *fasthttp.Request, remoteAddr string) *ProxyRequest {
|
||||
|
Reference in New Issue
Block a user