font-awesome.css找不到 #140
This commit is contained in:
@ -455,12 +455,15 @@ var port string
|
|||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
revel.OnAppStart(func() {
|
revel.OnAppStart(func() {
|
||||||
|
/*
|
||||||
|
不用配置的, 因为最终通过命令可以改, 而且有的使用nginx代理
|
||||||
port = strconv.Itoa(revel.HttpPort)
|
port = strconv.Itoa(revel.HttpPort)
|
||||||
if port != "80" {
|
if port != "80" {
|
||||||
port = ":" + port
|
port = ":" + port
|
||||||
} else {
|
} else {
|
||||||
port = "";
|
port = "";
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
siteUrl, _ := revel.Config.String("site.url") // 已包含:9000, http, 去掉成 leanote.com
|
siteUrl, _ := revel.Config.String("site.url") // 已包含:9000, http, 去掉成 leanote.com
|
||||||
if strings.HasPrefix(siteUrl, "http://") {
|
if strings.HasPrefix(siteUrl, "http://") {
|
||||||
@ -469,6 +472,17 @@ func init() {
|
|||||||
defaultDomain = siteUrl[len("https://"):]
|
defaultDomain = siteUrl[len("https://"):]
|
||||||
schema = "https://"
|
schema = "https://"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// port localhost:9000
|
||||||
|
ports := strings.Split(defaultDomain, ":")
|
||||||
|
if len(ports) == 2 {
|
||||||
|
port = ports[1]
|
||||||
|
}
|
||||||
|
if port == "80" {
|
||||||
|
port = ""
|
||||||
|
} else {
|
||||||
|
port = ":" + port
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user