genome-in-a-bottle / giab_latest_release

This repository contains information about latest release from Genome in a Bottle project
73 stars 5 forks source link

Enable CORS for Amazon S3 bucket? #10

Closed cmdcolin closed 5 years ago

cmdcolin commented 5 years ago

Hi there, I work with a web based genome browsers and being able to access remote resources is a great way to demo our tool, but generally we can only access resources that have CORS enabled.

Would it be possible to enable CORS on the S3 bucket?

I have found that these CORS settings worked well with S3

<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
    <CORSRule>
        <AllowedOrigin><!-- insert your origin here --></AllowedOrigin>
        <AllowedMethod>GET</AllowedMethod>
        <AllowedHeader>Range</AllowedHeader>
        <MaxAgeSeconds>3000</MaxAgeSeconds>
        <ExposeHeader>Accept-Ranges</ExposeHeader>
        <ExposeHeader>Content-Range</ExposeHeader>
        <ExposeHeader>Content-Encoding</ExposeHeader>
        <ExposeHeader>Content-Length</ExposeHeader>
        <AllowedHeader>Authorization</AllowedHeader>
    </CORSRule>
</CORSConfiguration>
cmdcolin commented 5 years ago

Probably * for AllowedOrigin :)

jzook commented 5 years ago

Thanks for reporting this. Could you submit this as an issue to AWS, since they would have control over this, here ( https://github.com/awslabs/open-data-registry/issues)? You might also be able to use the NCBI GIAB ftp files under ftp://ftp-trace.ncbi.nlm.nih.gov/giab/ftp/ if you replace ftp: with https:

Cheers, Justin

On Tue, Sep 10, 2019 at 5:47 PM Colin Diesh notifications@github.com wrote:

Probably * for AllowedOrigin :)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/genome-in-a-bottle/giab_latest_release/issues/10?email_source=notifications&email_token=AASTU5UL5T2ZOSSE4J6R4U3QJAIXJA5CNFSM4IVBIOJ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6MTE3I#issuecomment-530133613, or mute the thread https://github.com/notifications/unsubscribe-auth/AASTU5VBDL7OAB6TOLJPDY3QJAIXJANCNFSM4IVBIOJQ .

cmdcolin commented 5 years ago

Thanks for the recommendation. That makes sense. I'll close for now