mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-27 18:08:23 +03:00
Use cache for ttl if possible
Also fixes etag when compression enabled
This commit is contained in:
@@ -38,7 +38,7 @@ function getLastModified(hashType: hashType, hashKey: hashKey, service: Service)
|
||||
|
||||
export async function getEtag(hashType: hashType, hashKey: hashKey, service: Service): Promise<ETag> {
|
||||
const lastModified = await getLastModified(hashType, hashKey, service);
|
||||
return `${hashType};${hashKey};${service};${lastModified.getTime()}` as ETag;
|
||||
return `"${hashType};${hashKey};${service};${lastModified.getTime()}"` as ETag;
|
||||
}
|
||||
|
||||
/* example usage
|
||||
|
||||
Reference in New Issue
Block a user