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
commit23dcbb550625242f120f2211d744b746850e2085 (patch)
treed957a59239fc9f6131fb687e48102b1fd57e311f /utils/config.go
parent96a4750edef590ec64279ddba544a767c54ab6f7 (diff)
downloadchat-23dcbb550625242f120f2211d744b746850e2085.tar.gz
chat-23dcbb550625242f120f2211d744b746850e2085.tar.bz2
chat-23dcbb550625242f120f2211d744b746850e2085.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