mirror of
https://github.com/willnorris/imageproxy.git
synced 2026-04-29 14:56:25 +02:00
copy original content-type from remote response
This commit is contained in:
parent
15eb6b6da6
commit
bf8d7a0cd8
1 changed files with 1 additions and 0 deletions
|
|
@ -119,6 +119,7 @@ func (p *Proxy) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||||
}
|
}
|
||||||
|
|
||||||
w.Header().Add("Content-Length", resp.Header.Get("Content-Length"))
|
w.Header().Add("Content-Length", resp.Header.Get("Content-Length"))
|
||||||
|
w.Header().Add("Content-Type", resp.Header.Get("Content-Type"))
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
io.Copy(w, resp.Body)
|
io.Copy(w, resp.Body)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue