Compare commits
2 Commits
1b28b196a0
...
c7a56b1dde
Author | SHA1 | Date | |
---|---|---|---|
|
c7a56b1dde | ||
|
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)
|
||||||
|
@ -45,7 +45,7 @@ func (script) GenerateConfig() error {
|
|||||||
Email: client.Email,
|
Email: client.Email,
|
||||||
PublicKey: client.Keys.PublicKey,
|
PublicKey: client.Keys.PublicKey,
|
||||||
PresharedKey: client.Keys.PresharedKey,
|
PresharedKey: client.Keys.PresharedKey,
|
||||||
AllowedIPS: client.AllowedIpsStr,
|
AllowedIPS: client.IpAllocationStr,
|
||||||
Endpoint: client.Endpoint,
|
Endpoint: client.Endpoint,
|
||||||
CreateUser: client.CreateUser,
|
CreateUser: client.CreateUser,
|
||||||
Enabled: cast.ToBool(client.Enabled),
|
Enabled: cast.ToBool(client.Enabled),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user