Add grid view, image to tag (#641)

* Add grid view for tags
* Add tag page
* Import/export tags
* Add tag name uniqueness checks
* Fix styling on missing marker previews
* Add trace loglevel
* Add SQL trace
* Add filter options for tags
* Add tag sort by options
* Add tag page keyboard shortcuts
This commit is contained in:
WithoutPants
2020-07-07 10:35:43 +10:00
committed by GitHub
parent 54430dbc11
commit 244ae54f3f
55 changed files with 1526 additions and 228 deletions

View File

@@ -59,6 +59,12 @@ func ServeImage(image []byte, w http.ResponseWriter, r *http.Request) error {
}
}
contentType := http.DetectContentType(image)
if contentType == "text/xml; charset=utf-8" || contentType == "text/plain; charset=utf-8" {
contentType = "image/svg+xml"
}
w.Header().Set("Content-Type", contentType)
w.Header().Add("Etag", etag)
_, err := w.Write(image)
return err