mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-03 15:27:57 +08:00
Merge pull request #2672 from kpcyrd/feature/cache-control-immutable
Set Cache-Control immutable
This commit is contained in:
commit
7732411475
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user