diff --git a/.gitignore b/.gitignore index 3530f26c8..e93ad0de9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ build .goxc.local.json *.test +imageproxy.iml diff --git a/cmd/imageproxy/main.go b/cmd/imageproxy/main.go index 8ee260ac4..856f2aeb5 100644 --- a/cmd/imageproxy/main.go +++ b/cmd/imageproxy/main.go @@ -25,7 +25,7 @@ import ( "github.com/gregjones/httpcache" "github.com/gregjones/httpcache/diskcache" "github.com/peterbourgon/diskv" - "willnorris.com/go/imageproxy" + "github.com/almamedia/imageproxy" ) // goxc values diff --git a/imageproxy.go b/imageproxy.go index 6baf5323d..a89481d1b 100644 --- a/imageproxy.go +++ b/imageproxy.go @@ -125,6 +125,7 @@ func (p *Proxy) ServeHTTP(w http.ResponseWriter, r *http.Request) { copyHeader(w, resp, "Content-Length") copyHeader(w, resp, "Content-Type") + w.Header().Set("Cache-Control", fmt.Sprintf("max-age=%d, public, must-revalidate, proxy-revalidate", 31557600)) io.Copy(w, resp.Body) }