make ingest url configurable via environment variable
@@ -153,11 +153,6 @@ func loadUserConfig(pair *store.KVPair) error {
"dimensions": dims,
}
- // Parse and override the default ingest url via environment variable
- if url := os.Getenv("SFX_INGEST_URL"); url != "" {
- v["ingesturl"] = url
- }
-
// Parse the and override the default ingest url
if usercon.IngestURL != "" {
v["ingesturl"] = usercon.IngestURL
@@ -465,5 +460,10 @@ func Init(configfile string, reload chan<- struct{}, mutex *sync.Mutex) error {
}
}
+ // Parse and override the default ingest url via environment variable
+ if url := os.Getenv("SFX_INGEST_URL"); url != "" {
+ viper.Set("ingesturl", url)
+ }
+
return nil
}
