diff options
author | Christopher Speller <crspeller@gmail.com> | 2015-06-19 09:52:04 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2015-06-19 09:52:04 -0400 |
commit | 00275cc90569a05fc158fa9355b58550034bdcbb (patch) | |
tree | 17f08305392365b6d25edfa46e12a54a5b1d89ed | |
parent | 65a099066516fc44b5465d5e9a4412b31f634fdd (diff) | |
download | chat-00275cc90569a05fc158fa9355b58550034bdcbb.tar.gz chat-00275cc90569a05fc158fa9355b58550034bdcbb.tar.bz2 chat-00275cc90569a05fc158fa9355b58550034bdcbb.zip |
Defaulting to domain of localhost when no domain is given
-rw-r--r-- | utils/config.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/utils/config.go b/utils/config.go index 23bd3e85a..6a7e4589c 100644 --- a/utils/config.go +++ b/utils/config.go @@ -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 |