mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 13:10:54 +00:00
fix #2462
This commit is contained in:
parent
9266ece7a4
commit
28011a5835
@ -254,6 +254,9 @@ func parseConfig(appConfigPath string) (err error) {
|
||||
}
|
||||
|
||||
func assignConfig(ac config.Configer) error {
|
||||
for _, i := range []interface{}{&BConfig.Listen, &BConfig.WebConfig, &BConfig.Log, &BConfig.WebConfig.Session} {
|
||||
assignSingleConfig(i, ac)
|
||||
}
|
||||
// set the run mode first
|
||||
if envRunMode := os.Getenv("BEEGO_RUNMODE"); envRunMode != "" {
|
||||
BConfig.RunMode = envRunMode
|
||||
@ -261,10 +264,6 @@ func assignConfig(ac config.Configer) error {
|
||||
BConfig.RunMode = runMode
|
||||
}
|
||||
|
||||
for _, i := range []interface{}{BConfig, &BConfig.Listen, &BConfig.WebConfig, &BConfig.Log, &BConfig.WebConfig.Session} {
|
||||
assignSingleConfig(i, ac)
|
||||
}
|
||||
|
||||
if sd := ac.String("StaticDir"); sd != "" {
|
||||
BConfig.WebConfig.StaticDir = map[string]string{}
|
||||
sds := strings.Fields(sd)
|
||||
|
Loading…
Reference in New Issue
Block a user