Skip to content

Commit

Permalink
fix: add Access-Control-Allow-Methods limit
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoyuhen committed Apr 16, 2019
1 parent 038ec8b commit 4049347
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/griffith-mp4/src/fetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export default class FragmentFetch {
xhr.open('get', url)
xhr.responseType = 'arraybuffer'
xhr.setRequestHeader('Range', `bytes=${start}-${end}`)
xhr.setRequestHeader('Access-Control-Allow-Methods', 'GET, OPTIONS')
xhr.onload = () => {
if (xhr.status === 200 || xhr.status === 206) {
callback(xhr.response)
Expand Down

0 comments on commit 4049347

Please sign in to comment.