Compare commits
No commits in common. "c7a56b1dde45235ad51c0db42d4782d52f649e22" and "1b28b196a0dcb6adab720507f25a19b4a2dd8323" have entirely different histories.
c7a56b1dde
...
1b28b196a0
@ -59,6 +59,8 @@ func RequestLog() gin.HandlerFunc {
|
||||
}
|
||||
ua := c.Request.UserAgent() // UA
|
||||
|
||||
log.Debugf("真实IP是: %v === clientIP是: %v", c.Request.Header.Get("X-Real-Ip"), ip)
|
||||
|
||||
// 重写客户端IP
|
||||
c.Request.Header.Set("X-Forwarded-For", ip)
|
||||
c.Request.Header.Set("X-Real-IP", ip)
|
||||
|
@ -45,7 +45,7 @@ func (script) GenerateConfig() error {
|
||||
Email: client.Email,
|
||||
PublicKey: client.Keys.PublicKey,
|
||||
PresharedKey: client.Keys.PresharedKey,
|
||||
AllowedIPS: client.IpAllocationStr,
|
||||
AllowedIPS: client.AllowedIpsStr,
|
||||
Endpoint: client.Endpoint,
|
||||
CreateUser: client.CreateUser,
|
||||
Enabled: cast.ToBool(client.Enabled),
|
||||
|
Loading…
x
Reference in New Issue
Block a user