Skip to content

Commit 2f0cd91

Browse files
committed
general: allow video/iso and re-validate CORS when vary origin
1 parent 404c923 commit 2f0cd91

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

config.js

+1
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
video_mp4: "video/mp4",
8181
video_ogg: "video/ogg",
8282
video_webm: "video/webm",
83+
video_iso: "video/iso.segment",
8384
stream_apple_mpegurl: "application/vnd.apple.mpegurl",
8485
stream_x_mpegurl: "application/x-mpegURL",
8586
audio_mp3: "audio/mp3",

lib/utils.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,7 @@ export function getContentType(uriForCache, uriOriginal, options, cb) {
798798
|| error >= 500
799799
// Or ClourFront that gobbles up headers when checking CORS.
800800
|| (res.headers && !res.headers['access-control-allow-origin']
801-
&& res.headers['server'] === 'AmazonS3' && !error ))) {
801+
&& (res.headers['server'] === 'AmazonS3' || /origin/i.test(res.headers['vary'])) && !error ))) {
802802
makeCall(uriOriginal, 'GET');
803803
return;
804804
}

0 commit comments

Comments
 (0)