mirror of
https://github.com/AlistGo/alist.git
synced 2025-06-06 02:21:06 +08:00
feat: limit max connection count (#2701)
This commit is contained in:
@ -16,6 +16,9 @@ func Init(r *gin.Engine) {
|
||||
common.SecretKey = []byte(conf.Conf.JwtSecret)
|
||||
Cors(r)
|
||||
r.Use(middlewares.StoragesLoaded)
|
||||
if conf.Conf.MaxConnections > 0 {
|
||||
r.Use(middlewares.MaxAllowed(conf.Conf.MaxConnections))
|
||||
}
|
||||
WebDav(r.Group("/dav"))
|
||||
|
||||
r.GET("/favicon.ico", handles.Favicon)
|
||||
|
Reference in New Issue
Block a user