cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Our new Dropbox updates make your online life easier. See how you can store online-only files, edit photos in Dropbox and annotate PDFs with these updates.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Re: CORS requests involving OPTIONS preflight failing from Firefox and Safari

CORS requests involving OPTIONS preflight failing from Firefox and Safari

JimRobinson
Explorer | Level 4

We recently got an issue report that Dropbox had stopped workin in our app (https://igv.org/app) from Firefox and Safari.   The app is a genomics visualizer, we support loading genomics data from Dropbox.   The files are huge and most requests include a "range" header.   This triggers an OPTIONs request which is failing with a 404 not-found error, and no CORS headers in the response.  It is easy to reproduce with the following javascript from Firefox or Safari.   This request works from Chrome, its possible Chrome is not sending the OPTIONs request but that's a guess.   In any event OPTIONS is a valid method and this should not fail.    I do not know when this first occured, but it definitely worked in the past.

 

In the snippet below commenting out the "range" header results in a simple GET request which returns successfully.   The "range" header spawns an OPTIONS preflight, as it should, which fails.

 

fetch('https://dl.dropboxusercontent.com/s/zx7owfskn0jk6ab/heart_slc25a3.cram?dl=0', {
method: 'GET',
headers: {
range: 'bytes:1-1000'
}
}).then(x => x.blob().then(y => console.log(y)))

 

1 Accepted Solution

Accepted Solutions

Re: CORS requests involving OPTIONS preflight failing from Firefox and Safari

Greg-DB
Dropboxer

This should be fixed now. Thanks for the report!

View solution in original post

4 Replies 4

Re: CORS requests involving OPTIONS preflight failing from Firefox and Safari

JimRobinson
Explorer | Level 4

Network tab infroScreen Shot 2022-03-07 at 5.44.11 PM.png

Re: CORS requests involving OPTIONS preflight failing from Firefox and Safari

Greg-DB
Dropboxer

Thanks for the report! We'll look into it and I'll follow up here with any updates.

Re: CORS requests involving OPTIONS preflight failing from Firefox and Safari

Greg-DB
Dropboxer

This should be fixed now. Thanks for the report!

Re: CORS requests involving OPTIONS preflight failing from Firefox and Safari

JimRobinson
Explorer | Level 4

Thanks for the fast fix!  

Need more support?