Skip to content

Commit

Permalink
Merge pull request kubernetes#7083 from lavalamp/mimeType
Browse files Browse the repository at this point in the history
work around missing mime type
  • Loading branch information
piosz committed Apr 21, 2015
2 parents 9d5da50 + b9aaf90 commit ade6b23
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/ui/installsupport.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ limitations under the License.
package ui

import (
"mime"
"net/http"

assetfs "github.com/elazarl/go-bindata-assetfs"
Expand All @@ -27,6 +28,12 @@ type MuxInterface interface {
}

func InstallSupport(mux MuxInterface, enableSwaggerSupport bool) {

// Send correct mime type for .svg files. TODO: remove when
// https://github.com/golang/go/commit/21e47d831bafb59f22b1ea8098f709677ec8ce33
// makes it into all of our supported go versions.
mime.AddExtensionType(".svg", "image/svg+xml")

// Expose files in www/ on <host>/static/
fileServer := http.FileServer(&assetfs.AssetFS{Asset: Asset, AssetDir: AssetDir, Prefix: "www"})
prefix := "/static/"
Expand Down

0 comments on commit ade6b23

Please sign in to comment.