fix(security): trusted-proxy-scoped login rate limit
This commit is contained in:
@@ -15,6 +15,9 @@ func NewRouter(cfg *config.Config, st *store.Store, rdb *redispkg.R, sc *scanner
|
||||
gin.SetMode(gin.ReleaseMode)
|
||||
a := &api{cfg: cfg, st: st, rdb: rdb, sc: sc}
|
||||
r := gin.New()
|
||||
if e := r.SetTrustedProxies(cfg.TrustedProxies); e != nil {
|
||||
panic(e)
|
||||
}
|
||||
r.Use(gin.Recovery())
|
||||
g := r.Group("/api")
|
||||
g.GET("/healthz", func(c *gin.Context) { c.String(http.StatusOK, "ok") })
|
||||
|
||||
Reference in New Issue
Block a user