🎨
This commit is contained in:
parent
1b28b196a0
commit
37446ea958
@ -59,8 +59,6 @@ func RequestLog() gin.HandlerFunc {
|
|||||||
}
|
}
|
||||||
ua := c.Request.UserAgent() // UA
|
ua := c.Request.UserAgent() // UA
|
||||||
|
|
||||||
log.Debugf("真实IP是: %v === clientIP是: %v", c.Request.Header.Get("X-Real-Ip"), ip)
|
|
||||||
|
|
||||||
// 重写客户端IP
|
// 重写客户端IP
|
||||||
c.Request.Header.Set("X-Forwarded-For", ip)
|
c.Request.Header.Set("X-Forwarded-For", ip)
|
||||||
c.Request.Header.Set("X-Real-IP", ip)
|
c.Request.Header.Set("X-Real-IP", ip)
|
||||||
|
Loading…
Reference in New Issue
Block a user