From 9e386167830b31534904e8dc6e290d12377ba40c Mon Sep 17 00:00:00 2001 From: Jared Scheib Date: Tue, 13 Jun 2017 13:40:05 -0700 Subject: [PATCH] Add default InfluxData JSON feed url --- server/mux.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/server/mux.go b/server/mux.go index e77b0732e8..8b262a0bca 100644 --- a/server/mux.go +++ b/server/mux.go @@ -181,8 +181,14 @@ func NewMux(opts MuxOpts, service Service) http.Handler { router.PUT("/chronograf/v1/sources/:id/dbs/:dbid/rps/:rpid", service.UpdateRetentionPolicy) router.DELETE("/chronograf/v1/sources/:id/dbs/:dbid/rps/:rpid", service.DropRetentionPolicy) + // Set statusFeedURL to a default InfluxData JSON feed if not explicitly set by user + statusFeedURL := opts.StatusFeedURL + if statusFeedURL == "" { + statusFeedURL = "http://news.influxdata.com/feed.json" + } + externalLinks := getExternalLinksResponse{ - StatusFeed: &opts.StatusFeedURL, + StatusFeed: &statusFeedURL, } allRoutes := &AllRoutes{