From f43e59250f1a097d2d4449d032d9571cffa194ae Mon Sep 17 00:00:00 2001 From: Ajay Date: Thu, 11 Apr 2024 14:11:04 -0400 Subject: [PATCH] Add quotes to etag --- src/middleware/etag.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/middleware/etag.ts b/src/middleware/etag.ts index 826c305..abddc05 100644 --- a/src/middleware/etag.ts +++ b/src/middleware/etag.ts @@ -18,7 +18,7 @@ export function cacheMiddlware(req: Request, res: Response, next: NextFunction): .then(redisLastModified => { if (redisLastModified <= new Date(Number(lastModified) + 1000)) { // match cache, generate etag - const etag = `${hashType};${hashKey};${service};${redisLastModified.getTime()}` as ETag; + const etag = `"${hashType};${hashKey};${service};${redisLastModified.getTime()}"` as ETag; res.status(304).set("etag", etag).send(); } else next();