diff --git a/imageproxy.go b/imageproxy.go index 850fd32..4fb65b5 100644 --- a/imageproxy.go +++ b/imageproxy.go @@ -150,6 +150,10 @@ func (p *Proxy) serveImage(w http.ResponseWriter, r *http.Request) { } copyHeader(w.Header(), resp.Header, "Content-Length", "Content-Type") + + //Enable CORS for 3rd party applications + w.Header().Set("Access-Control-Allow-Origin", "*") + w.WriteHeader(resp.StatusCode) io.Copy(w, resp.Body) }