mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2024-11-12 18:04:29 +01:00
Add quotes to etag
This commit is contained in:
parent
dc2115ef20
commit
f43e59250f
1 changed files with 1 additions and 1 deletions
|
@ -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();
|
||||||
|
|
Loading…
Reference in a new issue