Skip to content

Commit 9d9e50a

Browse files
authored
Merge pull request #436 from ipfs/cache-control
gateway: clean Cache-Control and Last-Modified
2 parents 3c16df8 + 1148af2 commit 9d9e50a

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/http-gateways/path-gateway.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -370,17 +370,18 @@ in caches.
370370

371371
Returned directive depends on requested content path and format:
372372

373-
- `Cache-Control: public, max-age=29030400, immutable` must be returned for
373+
- `Cache-Control: public, max-age=29030400, immutable` MUST be returned for
374374
every immutable resource under `/ipfs/` namespace.
375375

376-
- `Cache-Control: public, max-age=<ttl>` should be returned for mutable
377-
resources under `/ipns/{id-with-ttl}/` namespace; `max-age=<ttl>` should
378-
indicate remaining TTL of the mutable pointer such as IPNS record or DNSLink
376+
- `Cache-Control: public, max-age=<ttl>` SHOULD be returned for mutable
377+
resources under `/ipns/{id-with-ttl}/` namespace; `max-age=<ttl>` SHOULD
378+
indicate remaining TTL of the mutable pointer such as :cite[ipns-record] or DNSLink
379379
TXT record.
380380
- Implementations MAY place an upper bound on any TTL received, as
381381
noted in Section 8 of :cite[rfc2181].
382-
- If TTL value is unknown, implementations SHOULD set it to a static
383-
value, but it SHOULD not be lower than 60 seconds.
382+
- If TTL value is unknown, implementations SHOULD not send a `Cache-Control`
383+
- No matter if TTL value is known or not, implementations SHOULD always
384+
send a [`Last-Modified`](#last-modified-response-header) header with the timestamp of the record resolution.
384385

385386
### `Last-Modified` (response header)
386387

0 commit comments

Comments
 (0)