Skip to content

Commit d3f95fd

Browse files
committed
fixed KV PUT failed: 400 Invalid expiration_ttl of 0
1 parent 26faba9 commit d3f95fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/jwk-fetcher.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export class UrlKeyFetcher implements KeyFetcher {
6363

6464
// store the public keys cache in the KV store.
6565
const maxAge = parseMaxAge(cacheControlHeader);
66-
if (!isNaN(maxAge)) {
66+
if (!isNaN(maxAge) && maxAge > 0) {
6767
await this.keyStorer.put(JSON.stringify(publicKeys.keys), maxAge);
6868
}
6969

0 commit comments

Comments
 (0)