Merge pull request #5622 from influxdata/5565/js_content_type
fix(windows): programtically assign text/javascript content typepull/5624/head
commit
64ce0415b1
|
@ -7,7 +7,7 @@
|
|||
1. [#5616](https://github.com/influxdata/chronograf/pull/5616): AND not-equal conditions in the generated tickscript where filter.
|
||||
1. [#5618](https://github.com/influxdata/chronograf/pull/5618): Disable InfluxDB admin page if administration is not possible.
|
||||
1. [#5619](https://github.com/influxdata/chronograf/pull/5619): Use token authentication against InfluxDB v2 sources.
|
||||
|
||||
1. [#5622](https://github.com/influxdata/chronograf/pull/5622): Avoid blank screen on Windows.
|
||||
|
||||
### Features
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ package dist
|
|||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
assetfs "github.com/elazarl/go-bindata-assetfs"
|
||||
)
|
||||
|
@ -82,6 +83,11 @@ func (b *BindataAssets) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||
if err := b.addCacheHeaders(name, w); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// https://github.com/influxdata/chronograf/issues/5565
|
||||
// workaround wrong .js content-type on windows
|
||||
if strings.HasSuffix(name, ".js") {
|
||||
w.Header().Set("Content-Type", "text/javascript")
|
||||
}
|
||||
return octets, nil
|
||||
}
|
||||
var dir http.FileSystem = &assetfs.AssetFS{
|
||||
|
|
Loading…
Reference in New Issue