Defaulting to domain of localhost when no domain is given

This commit is contained in:
Christopher Speller
2015-06-19 09:52:04 -04:00
parent 65a0990665
commit 00275cc905

View File

@@ -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