提交 936cb735 编写于 作者: J JessonChan

file extensions bug fixed

上级 f708ce02
......@@ -523,7 +523,7 @@ func ParseConfig() (err error) {
if sgz := AppConfig.String("StaticExtensionsToGzip"); sgz != "" {
extensions := strings.Split(sgz, ",")
StaticExtensionsToGzip = []string{}
fileExts := []string{}
for _, ext := range extensions {
ext = strings.TrimSpace(ext)
if ext == "" {
......@@ -533,7 +533,10 @@ func ParseConfig() (err error) {
if !strings.HasPrefix(ext, ".") {
ext = "." + ext
}
StaticExtensionsToGzip = append(StaticExtensionsToGzip, ext)
fileExts = append(fileExts, ext)
}
if len(fileExts) > 0 {
StaticExtensionsToGzip = fileExts
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册