Skip to content

Commit

Permalink
feat: increase signature expiration time (#704)
Browse files Browse the repository at this point in the history
* feat: increase signature expiration time

* chore: decrease the signature to 5 mins
  • Loading branch information
juanmahidalgo committed Sep 7, 2023
1 parent bfded10 commit 33e5d34
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/middleware/authentication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export async function decodeAuthChain(req: Request): Promise<string> {
try {
await verify(req.method, `/${API_VERSION}${req.path}`, req.headers, {
fetcher: peerAPI.signatureFetcher,
expiration: 1000 * 60 * 5, // 5 minutes
})
} catch (error) {
errorMessage = isErrorWithMessage(error) ? error.message : 'Unknown'
Expand Down

0 comments on commit 33e5d34

Please sign in to comment.