summaryrefslogtreecommitdiffstats
path: root/utils/config.go
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2015-06-19 09:52:04 -0400
committerChristopher Speller <crspeller@gmail.com>2015-06-19 09:52:04 -0400
commit00275cc90569a05fc158fa9355b58550034bdcbb (patch)
tree17f08305392365b6d25edfa46e12a54a5b1d89ed /utils/config.go
parent65a099066516fc44b5465d5e9a4412b31f634fdd (diff)
downloadchat-00275cc90569a05fc158fa9355b58550034bdcbb.tar.gz
chat-00275cc90569a05fc158fa9355b58550034bdcbb.tar.bz2
chat-00275cc90569a05fc158fa9355b58550034bdcbb.zip
Defaulting to domain of localhost when no domain is given
Diffstat (limited to 'utils/config.go')
-rw-r--r--utils/config.go4
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