Skip to content

Commit

Permalink
fix: only use x-forwarded-for
Browse files Browse the repository at this point in the history
  • Loading branch information
jmattheis committed Feb 4, 2024
1 parent 949e5df commit 2953d75
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions router/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
func Create(db *database.GormDatabase, vInfo *model.VersionInfo, conf *config.Configuration) (*gin.Engine, func()) {
g := gin.New()

g.RemoteIPHeaders = []string{"X-Forwarded-For"}
g.SetTrustedProxies(conf.Server.TrustedProxies)
g.ForwardedByClientIP = true

Expand Down

0 comments on commit 2953d75

Please sign in to comment.