mirror of
https://github.com/astaxie/beego.git
synced 2025-06-12 08:20:39 +00:00
config index out of range bug fixed
This commit is contained in:
@ -49,6 +49,7 @@ func InitGzip(cf config.Configer) {
|
||||
}
|
||||
methods := cf.DefaultStrings("includedMethods", []string{"GET"})
|
||||
getMethodOnly = (len(methods) == 0) || (len(methods) == 1 && strings.ToUpper(methods[0]) == "GET")
|
||||
includedMethods = make(map[string]bool, len(methods))
|
||||
for _, v := range methods {
|
||||
includedMethods[strings.ToUpper(v)] = true
|
||||
}
|
||||
|
Reference in New Issue
Block a user