mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 12:50:55 +00:00
getMethodOnly assign fixed
This commit is contained in:
parent
9f21928a90
commit
4caf044be2
@ -48,7 +48,7 @@ func InitGzip(cf config.Configer) {
|
||||
gzipCompressLevel = flate.BestSpeed
|
||||
}
|
||||
methods := cf.DefaultStrings("includedMethods", []string{"GET"})
|
||||
getMethodOnly = len(methods) == 1 && strings.ToUpper(methods[0]) == "GET"
|
||||
getMethodOnly = (len(methods) == 0) || (len(methods) == 1 && strings.ToUpper(methods[0]) == "GET")
|
||||
for _, v := range methods {
|
||||
includedMethods[strings.ToUpper(v)] = true
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user