...
|
...
|
@@ -33,6 +33,12 @@ func init() { |
|
|
//https支持
|
|
|
web.BConfig.Listen.EnableHTTPS = true
|
|
|
web.BConfig.Listen.HTTPSPort = 443
|
|
|
if os.Getenv("HTTPS_PORT") != "" {
|
|
|
portStr := os.Getenv("HTTPS_PORT")
|
|
|
if port, err := strconv.Atoi(portStr); err == nil {
|
|
|
web.BConfig.Listen.HTTPSPort = port
|
|
|
}
|
|
|
}
|
|
|
web.BConfig.Listen.HTTPSCertFile = "./config/fjmaimaimai.com_bundle.crt"
|
|
|
web.BConfig.Listen.HTTPSKeyFile = "./config/fjmaimaimai.com.key"
|
|
|
web.InsertFilter("/*", web.BeforeRouter, filters.AllowCors())
|
...
|
...
|
|