forked from tangled.org/core
this repo has no description

knotserver/xrpc: set Content-Type when serving images

svgs were broken since they defaulted to text/plain instead of
image/svg+xml.

Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.sh>

anirudh.fi bfecda4a 44554dc8

verified
Changed files
+1
knotserver
+1
knotserver/xrpc/repo_blob.go
···
return
}
w.Header().Set("ETag", eTag)
case strings.HasPrefix(mimeType, "text/"):
w.Header().Set("Cache-Control", "public, no-cache")
···
return
}
w.Header().Set("ETag", eTag)
+
w.Header().Set("Content-Type", mimeType)
case strings.HasPrefix(mimeType, "text/"):
w.Header().Set("Cache-Control", "public, no-cache")