fix: only use x-forwarded-for
This commit is contained in:
parent
949e5df17e
commit
2953d75824
|
|
@ -27,6 +27,7 @@ import (
|
||||||
func Create(db *database.GormDatabase, vInfo *model.VersionInfo, conf *config.Configuration) (*gin.Engine, func()) {
|
func Create(db *database.GormDatabase, vInfo *model.VersionInfo, conf *config.Configuration) (*gin.Engine, func()) {
|
||||||
g := gin.New()
|
g := gin.New()
|
||||||
|
|
||||||
|
g.RemoteIPHeaders = []string{"X-Forwarded-For"}
|
||||||
g.SetTrustedProxies(conf.Server.TrustedProxies)
|
g.SetTrustedProxies(conf.Server.TrustedProxies)
|
||||||
g.ForwardedByClientIP = true
|
g.ForwardedByClientIP = true
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue