0
Fork 0
mirror of https://github.com/willnorris/imageproxy.git synced 2024-12-16 21:56:43 -05:00

adding cache-control header

This commit is contained in:
Rune Madsen 2015-09-05 10:51:07 -04:00
parent 9213c93c94
commit 9a4791d60a

View file

@ -124,6 +124,7 @@ func (p *Proxy) ServeHTTP(w http.ResponseWriter, r *http.Request) {
cached := resp.Header.Get(httpcache.XFromCache) cached := resp.Header.Get(httpcache.XFromCache)
glog.Infof("request: %v (served from cache: %v)", *req, cached == "1") glog.Infof("request: %v (served from cache: %v)", *req, cached == "1")
copyHeader(w, resp, "Cache-Control")
copyHeader(w, resp, "Last-Modified") copyHeader(w, resp, "Last-Modified")
copyHeader(w, resp, "Expires") copyHeader(w, resp, "Expires")
copyHeader(w, resp, "Etag") copyHeader(w, resp, "Etag")