From c0cc65aef6e758b1d6024087654020e8e646e306 Mon Sep 17 00:00:00 2001 From: Rohan Kumar Date: Fri, 11 Dec 2020 23:45:32 -0800 Subject: [PATCH] Chore: Add more media mimetypes Add some mimetypes for images/audio/video. --- packages/hint-http-cache/src/hint.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/hint-http-cache/src/hint.ts b/packages/hint-http-cache/src/hint.ts index 2f8d83e1ac7..370a999c263 100644 --- a/packages/hint-http-cache/src/hint.ts +++ b/packages/hint-http-cache/src/hint.ts @@ -68,8 +68,11 @@ export default class HttpCacheHint implements IHint { 'application/manifest+json', 'audio/ogg', + 'audio/opus', 'audio/mpeg', 'audio/mp4', + 'audio/x-flac', + 'audio/x-wav', 'font/collection', 'application/vnd.ms-fontobject', @@ -79,9 +82,11 @@ export default class HttpCacheHint implements IHint { 'font/woff', 'font/woff2', + 'image/avif', 'image/bmp', 'image/gif', 'image/jpeg', + 'image/jp2', 'image/png', 'image/svg+xml', 'image/webp', @@ -92,7 +97,8 @@ export default class HttpCacheHint implements IHint { 'video/mp4', 'video/ogg', - 'video/webm']; + 'video/webm', + 'video/x-matroska']; /** The predefined patterns for file revving.*/ const predefinedRevvingPatterns: RegExp[] = [ /*