Skip to content
This repository was archived by the owner on Apr 18, 2024. It is now read-only.

Commit 91b4ca3

Browse files
authored
fix: LSDV-4662: Use empty range GET requests instead of HEAD to avoid CORS issue on video presigned urls (#1225)
fix: LSDV-4662: Use empty range GET requests instead of HEAD to avoid CORS issue
1 parent 77dd0e2 commit 91b4ca3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/components/VideoCanvas/VirtualVideo.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ const canPlayUrl = async (url: string) => {
1212
const video = document.createElement('video');
1313

1414
const fileMeta = await fetch(url, {
15-
method: 'HEAD',
15+
method: 'GET',
16+
headers: {
17+
'Range': 'bytes=0-0',
18+
},
1619
});
1720

1821
const fileType = fileMeta.headers.get('content-type');

0 commit comments

Comments
 (0)