mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-07 12:07:07 +03:00
Add quotes to etag
This commit is contained in:
@@ -18,7 +18,7 @@ export function cacheMiddlware(req: Request, res: Response, next: NextFunction):
|
|||||||
.then(redisLastModified => {
|
.then(redisLastModified => {
|
||||||
if (redisLastModified <= new Date(Number(lastModified) + 1000)) {
|
if (redisLastModified <= new Date(Number(lastModified) + 1000)) {
|
||||||
// match cache, generate etag
|
// 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();
|
res.status(304).set("etag", etag).send();
|
||||||
}
|
}
|
||||||
else next();
|
else next();
|
||||||
|
|||||||
Reference in New Issue
Block a user