From 00275cc90569a05fc158fa9355b58550034bdcbb Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Fri, 19 Jun 2015 09:52:04 -0400 Subject: Defaulting to domain of localhost when no domain is given --- utils/config.go | 4 ++++ 1 file changed, 4 insertions(+) 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 -- cgit v1.2.3-1-g7c22