Compare commits

...

2 Commits

Author SHA1 Message Date
coward
c7a56b1dde 🐛修复一个牛逼的bug
All checks were successful
continuous-integration/drone/tag Build is passing
2024-08-22 11:43:23 +08:00
coward
37446ea958 🎨 2024-08-22 11:14:28 +08:00
2 changed files with 1 additions and 3 deletions

View File

@ -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)

View File

@ -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),