mirror of
https://github.com/willnorris/imageproxy.git
synced 2026-04-27 05:46:25 +02:00
add svg output support, but only with primitive
This commit is contained in:
parent
b951a9ccc3
commit
a1e81bb21f
3 changed files with 17 additions and 2 deletions
|
|
@ -263,6 +263,9 @@ func peekContentType(p *bufio.Reader) string {
|
|||
if err != nil && err != bufio.ErrBufferFull && err != io.EOF {
|
||||
return ""
|
||||
}
|
||||
if bytes.HasPrefix(byt, []byte("<svg")) {
|
||||
return "image/svg+xml"
|
||||
}
|
||||
return http.DetectContentType(byt)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue