Merge pull request #2672 from kpcyrd/feature/cache-control-immutable

Set Cache-Control immutable
This commit is contained in:
Jeromy Johnson 2016-05-13 16:01:43 -07:00
commit 7732411475

View File

@ -205,7 +205,7 @@ func (i *gatewayHandler) getOrHeadHandler(w http.ResponseWriter, r *http.Request
modtime := time.Now()
if strings.HasPrefix(urlPath, ipfsPathPrefix) {
w.Header().Set("Etag", etag)
w.Header().Set("Cache-Control", "public, max-age=29030400")
w.Header().Set("Cache-Control", "public, max-age=29030400, immutable")
// set modtime to a really long time ago, since files are immutable and should stay cached
modtime = time.Unix(1, 0)