Skip to content

Commit

Permalink
fix: enclose response etag in double quotes (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelcr committed Feb 9, 2023
1 parent f977f3b commit 2b77cfe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api/util/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ export async function handleTokenCache(request: FastifyRequest, reply: FastifyRe
const etag = await getTokenEtag(request);
if (etag) {
if (ifNoneMatch && ifNoneMatch.includes(etag)) {
await reply.header('cache-control', CACHE_CONTROL_MUST_REVALIDATE).code(304).send();
await reply.header('Cache-Control', CACHE_CONTROL_MUST_REVALIDATE).code(304).send();
} else {
void reply.header('etag', etag);
void reply.header('ETag', `"${etag}"`);
}
}
}
Expand Down

0 comments on commit 2b77cfe

Please sign in to comment.