mirror of
https://github.com/outbackdingo/databunker.git
synced 2026-01-27 18:18:43 +00:00
add support for serving svg files
This commit is contained in:
@@ -237,6 +237,8 @@ func (e mainEnv) setupRouter() *httprouter.Router {
|
||||
w.Header().Set("Content-Type", "text/css")
|
||||
} else if strings.HasSuffix(r.URL.Path, ".js") {
|
||||
w.Header().Set("Content-Type", "text/javascript")
|
||||
} else if strings.HasSuffix(r.URL.Path, ".svg") {
|
||||
w.Header().Set("Content-Type", "image/svg+xml")
|
||||
}
|
||||
w.WriteHeader(200)
|
||||
w.Write([]byte(data))
|
||||
|
||||
Reference in New Issue
Block a user