Using CORS in private buckets Using CORS in private buckets

Using CORS in private buckets

Nathan Verrilli Nathan Verrilli

Using CORS in private buckets

Because browsers are specifically mandated to strip user-headers from CORS requests, it is not possible to use the AUTHORIZATION header in download requests from private buckets when those requests come from a browser.

Use the alternative authentication method of appending the authentication string to the download URL. For example, to download the file helloworld.html from a public bucket publichello the url might be:

https://f000.backblaze2.com/files/publichello/helloworld.html

To download a similar file from a bucket privatehello might be:

https://f000.backblaze2.com/files/privatehello/helloworld.html?Authorization=3_20181021181348_1654aeb9046d1bcdd60dff3c_06314b74a8fc99f72def5a18c1b3c87ab35f329c_000_20181030221348_0000_ dnld

Please note: Although web standards are to ignore case in the headers, URLS are case sensitive. Authorization must have the first letter capitalized, and the remainder in lower case.