Skip to content

Commit

Permalink
Merge pull request #2672 from kpcyrd/feature/cache-control-immutable
Browse files Browse the repository at this point in the history
Set Cache-Control immutable
  • Loading branch information
whyrusleeping committed May 13, 2016
2 parents 704dcb8 + c2a3e31 commit 7732411
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/corehttp/gateway_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7732411

Please sign in to comment.