mirror of
https://github.com/pcvolkmer/idicon.git
synced 2025-04-19 08:36:50 +00:00
Fix content type for JPEG images
This commit is contained in:
parent
1ef6510abd
commit
59e4dce4e3
@ -83,7 +83,7 @@ func requestHandler(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Add("Content-Type", "image/svg+xml")
|
||||
_, err = w.Write([]byte(iconGenerator.GenSvg(id, size)))
|
||||
} else if ct == "jpeg" || cth == "image/jpeg" {
|
||||
w.Header().Add("Content-Type", "image/webp")
|
||||
w.Header().Add("Content-Type", "image/jpeg")
|
||||
err = jpeg.Encode(w, iconGenerator.GenIcon(id, size), nil)
|
||||
} else {
|
||||
w.Header().Add("Content-Type", "image/png")
|
||||
|
Loading…
x
Reference in New Issue
Block a user