From 0fbcdde5f5963b4e196df759967eea6e7ad28539 Mon Sep 17 00:00:00 2001 From: Sebastien Douheret Date: Wed, 30 Aug 2017 00:30:28 +0200 Subject: [PATCH] Set default xds-apikey when not set by config. --- lib/xdsconfig/fileconfig.go | 6 ++++++ 1 file changed, 6 insertions(+) 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 } -- 2.16.6