1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 19:41:00 +00:00

当有设置的压缩类型时,丢弃默认类型(css,js)

This commit is contained in:
JessonChan 2015-09-22 12:24:52 +08:00
parent dc38b324e0
commit f708ce0299

View File

@ -523,6 +523,7 @@ func ParseConfig() (err error) {
if sgz := AppConfig.String("StaticExtensionsToGzip"); sgz != "" { if sgz := AppConfig.String("StaticExtensionsToGzip"); sgz != "" {
extensions := strings.Split(sgz, ",") extensions := strings.Split(sgz, ",")
StaticExtensionsToGzip = []string{}
for _, ext := range extensions { for _, ext := range extensions {
ext = strings.TrimSpace(ext) ext = strings.TrimSpace(ext)
if ext == "" { if ext == "" {