This commit is contained in:
商讯在线 2014-10-24 22:35:49 +08:00
parent 682f8f451d
commit 5e46dd3eb5
1 changed files with 6 additions and 5 deletions

11
main.go
View File

@ -49,11 +49,6 @@ func init() {
// 定时检查无效会话 // 定时检查无效会话
session.FixedTimeRelease() session.FixedTimeRelease()
//解决Windows环境下问题
mime.AddExtensionType(".css", "text/css")
mime.AddExtensionType(".js", "application/x-javascript")
mime.AddExtensionType(".json", "application/json")
} }
// 登录. // 登录.
@ -279,6 +274,12 @@ func aboutHandler(w http.ResponseWriter, r *http.Request) {
// 主程序入口. // 主程序入口.
func main() { func main() {
//解决Windows环境下问题
mime.AddExtensionType(".css", "text/css")
mime.AddExtensionType(".js", "application/x-javascript")
mime.AddExtensionType(".json", "application/json")
runtime.GOMAXPROCS(conf.Wide.MaxProcs) runtime.GOMAXPROCS(conf.Wide.MaxProcs)
defer glog.Flush() defer glog.Flush()