Skip to content

Commit

Permalink
Merge pull request #436 from ipfs/cache-control
Browse files Browse the repository at this point in the history
gateway: clean Cache-Control and Last-Modified
  • Loading branch information
lidel authored Sep 25, 2023
2 parents 3c16df8 + 1148af2 commit 9d9e50a
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/http-gateways/path-gateway.md
Original file line number Diff line number Diff line change
Expand Up @@ -370,17 +370,18 @@ in caches.

Returned directive depends on requested content path and format:

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

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

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

Expand Down

0 comments on commit 9d9e50a

Please sign in to comment.