[ensembl-dev] Cross-Origin Resource Sharing (CORS) for the REST API?

Thomas Down thomas.a.down at gmail.com
Wed May 15 10:28:27 BST 2013


Brilliant, thanks!  Slightly confusingly, the CORS headers don't show up in
a quick command-line test using curl, looks like they're only added if an
Origin header is present in the request.

           Thomas.


On Wed, May 15, 2013 at 10:20 AM, Andy Yates <ayates at ebi.ac.uk> wrote:

> Hi Thomas,
>
> It's already been enabled on the server. You can see confirmation of this
> here:
>
>
> http://client.cors-api.appspot.com/client#?client_method=GET&client_credentials=false&server_url=http%3A%2F%2Fbeta.rest.ensembl.org%2Finfo%2Fping.json&server_enable=true&server_status=200&server_credentials=false&server_tabs=remote
>
> Andy
>
> Andrew Yates                   Ensembl Core Software Project Leader
> EMBL-EBI                       Tel: +44-(0)1223-492538
> Wellcome Trust Genome Campus   Fax: +44-(0)1223-494468
> Cambridge CB10 1SD, UK         http://www.ensembl.org/
>
> On 15 May 2013, at 10:18, Thomas Down <thomas.a.down at gmail.com> wrote:
>
> > Would it be possible to add CORS support to to this API?  This would
> allow the API to be used from browser-based clients without having to jump
> through the JSONP hoops.  The full spec is here:
> >
> >       http://www.w3.org/TR/cors/
> >
> > But for a publicly-accessible API, all that's really needed is to add
> the header:
> >
> >       Access-Control-Allow-Origin: *
> >
> > to all responses.
> >
> > Best wishes,
> >
> >                  Thomas.
> > _______________________________________________
> > Dev mailing list    Dev at ensembl.org
> > Posting guidelines and subscribe/unsubscribe info:
> http://lists.ensembl.org/mailman/listinfo/dev
> > Ensembl Blog: http://www.ensembl.info/
>
>
> _______________________________________________
> Dev mailing list    Dev at ensembl.org
> Posting guidelines and subscribe/unsubscribe info:
> http://lists.ensembl.org/mailman/listinfo/dev
> Ensembl Blog: http://www.ensembl.info/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ensembl.org/pipermail/dev_ensembl.org/attachments/20130515/1dc84f68/attachment.html>


More information about the Dev mailing list