summaryrefslogtreecommitdiffstats
path: root/lib/xdsconfig/fileconfig.go
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2017-08-30 00:30:28 +0200
committerSebastien Douheret <sebastien.douheret@iot.bzh>2017-08-30 00:30:28 +0200
commit0fbcdde5f5963b4e196df759967eea6e7ad28539 (patch)
treece19a6fcae563cefb29a13b067cd864b6b58a730 /lib/xdsconfig/fileconfig.go
parentd8cf653394005010c74f72ed55a90ec19d345b8a (diff)
Set default xds-apikey when not set by config.
Diffstat (limited to 'lib/xdsconfig/fileconfig.go')
-rw-r--r--lib/xdsconfig/fileconfig.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/xdsconfig/fileconfig.go b/lib/xdsconfig/fileconfig.go
index add6ef7..2795206 100644
--- a/lib/xdsconfig/fileconfig.go
+++ b/lib/xdsconfig/fileconfig.go
@@ -92,5 +92,11 @@ func updateConfigFromFile(c *Config, confFile string) (*FileConfig, error) {
c.HTTPPort = fCfg.HTTPPort
}
+ // Set default apikey
+ // FIXME - rework with dynamic key
+ if fCfg.XDSAPIKey == "" {
+ fCfg.XDSAPIKey = "1234abcezam"
+ }
+
return &fCfg, nil
}