Defaulting to domain of localhost when no domain is given

Этот коммит содержится в:
Christopher Speller
2015-06-19 09:52:04 -04:00
родитель 5ca9397c3c
Коммит 634d29fead

Просмотреть файл

@@ -221,6 +221,10 @@ func LoadConfig(fileName string) {
// Grabs the domain from enviroment variable if not in configuration
if config.ServiceSettings.Domain == "" {
config.ServiceSettings.Domain = os.Getenv("MATTERMOST_DOMAIN")
// If the enviroment variable is not set, use a default
if config.ServiceSettings.Domain == "" {
config.ServiceSettings.Domain = "localhost"
}
}
// Check for a valid email for feedback, if not then do feedback@domain