正在显示
1 个修改的文件
包含
6 行增加
和
0 行删除
@@ -33,6 +33,12 @@ func init() { | @@ -33,6 +33,12 @@ func init() { | ||
33 | //https支持 | 33 | //https支持 |
34 | web.BConfig.Listen.EnableHTTPS = true | 34 | web.BConfig.Listen.EnableHTTPS = true |
35 | web.BConfig.Listen.HTTPSPort = 443 | 35 | web.BConfig.Listen.HTTPSPort = 443 |
36 | + if os.Getenv("HTTPS_PORT") != "" { | ||
37 | + portStr := os.Getenv("HTTPS_PORT") | ||
38 | + if port, err := strconv.Atoi(portStr); err == nil { | ||
39 | + web.BConfig.Listen.HTTPSPort = port | ||
40 | + } | ||
41 | + } | ||
36 | web.BConfig.Listen.HTTPSCertFile = "./config/fjmaimaimai.com_bundle.crt" | 42 | web.BConfig.Listen.HTTPSCertFile = "./config/fjmaimaimai.com_bundle.crt" |
37 | web.BConfig.Listen.HTTPSKeyFile = "./config/fjmaimaimai.com.key" | 43 | web.BConfig.Listen.HTTPSKeyFile = "./config/fjmaimaimai.com.key" |
38 | web.InsertFilter("/*", web.BeforeRouter, filters.AllowCors()) | 44 | web.InsertFilter("/*", web.BeforeRouter, filters.AllowCors()) |
-
请 注册 或 登录 后发表评论