diff --git a/server/url_prefixer.go b/server/url_prefixer.go index 0a58436460..9d095fa121 100644 --- a/server/url_prefixer.go +++ b/server/url_prefixer.go @@ -5,6 +5,7 @@ import ( "bytes" "io" "net/http" + "regexp" "github.com/influxdata/chronograf" ) @@ -83,6 +84,12 @@ func (up *URLPrefixer) ServeHTTP(rw http.ResponseWriter, r *http.Request) { return } + isSVG, _ := regexp.Match(".svg$", []byte(r.URL.String())) + if isSVG { + up.Next.ServeHTTP(rw, r) + return + } + // chunked transfer because we're modifying the response on the fly, so we // won't know the final content-length rw.Header().Set("Connection", "Keep-Alive")