From: Sebastien Douheret Date: Tue, 29 Aug 2017 22:30:28 +0000 (+0200) Subject: Set default xds-apikey when not set by config. X-Git-Tag: 0.1.0~2 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?p=src%2Fxds%2Fxds-agent.git;a=commitdiff_plain;h=0fbcdde5f5963b4e196df759967eea6e7ad28539 Set default xds-apikey when not set by config. --- 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 }