Merge remote-tracking branch 'overseerr/develop' into develop

This commit is contained in:
notfakie
2023-01-27 17:55:55 +13:00
158 changed files with 10835 additions and 4524 deletions

View File

@@ -192,9 +192,11 @@ class ImageProxy {
const buffer = Buffer.from(response.data, 'binary');
const extension = path.split('.').pop() ?? '';
const maxAge = Number(response.headers['cache-control'].split('=')[1]);
const maxAge = Number(
(response.headers['cache-control'] ?? '0').split('=')[1]
);
const expireAt = Date.now() + maxAge * 1000;
const etag = response.headers.etag.replace(/"/g, '');
const etag = (response.headers.etag ?? '').replace(/"/g, '');
await this.writeToCacheDir(
directory,