update go packages version, add ip proxy and real ip headers to config.
This commit is contained in:
@@ -32,6 +32,11 @@ func New(cfg *config.Config) *Server {
|
||||
}
|
||||
|
||||
router := gin.Default()
|
||||
// Configure trusted proxies and real IP headers
|
||||
_ = router.SetTrustedProxies(cfg.TrustedProxies)
|
||||
if len(cfg.RealIPHeaders) > 0 {
|
||||
router.RemoteIPHeaders = cfg.RealIPHeaders
|
||||
}
|
||||
store := sessions.NewCookieStore([]byte(cfg.SecretKey))
|
||||
|
||||
// Initialize auth service (panic on error during startup)
|
||||
|
||||
Reference in New Issue
Block a user