[DAS] Dalliance: a new genome DAS client
Andy Jenkinson
andy.jenkinson at ebi.ac.uk
Wed Aug 4 14:53:05 UTC 2010
Sure:
http://www.ebi.ac.uk/das-srv/genomicdas/das/sources
The implementation in ProServer is a bit more advanced in that it deals with preflight (HTTP "options") requests. These are necessary if the client sends custom headers (err, like X-DAS-Client in DAS 1.6) and non-simple requests (such as PUT). Cross-origin writeback would require preflight request support, for example.
By the way, I just looked at the CORS spec and have made some changes to ProServer's implementation to support the 'expose headers' portion of the spec. Either this wasn't there last year or I missed it. I think this is necessary before the browser will get access to the custom DAS headers such as X-DAS-Status.
Here's some code:
if ($request->method eq 'options') {
# For W3C Access Control preflight requests
$response->header('Access-Control-Allow-Methods' => 'GET, POST, OPTIONS');
$response->header('Access-Control-Allow-Headers' => 'X-DAS-Version, X-DAS-Client');
$response->header('Access-Control-Max-Age', => '2592000'); # preflight can be cached for 30 days
}
# Add Access Control headers (for cross site requests):
$response->header('Access-Control-Allow-Origin' => $request->header('Origin') || '*');
$response->header('Access-Control-Expose-Headers' => 'X-DAS-Version, X-DAS-Server, X-DAS-Status, X-DAS-Capabilities');
$response->header('Access-Control-Allow-Credentials' => 'true');
Cheers,
Andy
On 4 Aug 2010, at 15:03, Leyla Garcia wrote:
> About CORS,
>
> >If you run your own DAS servers and
> >don't list them in the registry, you'll need to check for CORS compatibility
> >yourself. The latest versions of Proserver and Dazzle should both be okay.
>
> If I am not mistaken, Proserver already implements CORS headers?
> Andy, could you please send me a link of a Proserver server that implements this?
>
> Thanks,
>
> Leyla
>
> On 03/08/2010 21:52, Jonathan Warren wrote:
>> This is very cool - I had a look the other day. Was wondering why some sources could be attached and some can't....
>> Best browser experience yet by far I'd say.
>>
>> No problems about adding CORS support - for the record I'm very happy to implement new capabilities testing and other suggestions to the registry from anyone who cares to drop me a line. Especially if it's going to enhance and promote the use of the registry :)
>>
>>
>> On 3 Aug 2010, at 20:41, Thomas Down wrote:
>>
>>> As some of you already know, I've been experimenting recently with a
>>> web-based DAS client for genomic data. It's still in
>>> a unashamedly prototypical state (in particular, some of the popups and
>>> configuration stuff is outright clunky, and we know it!), but we're starting
>>> to find it quite useful, and would be interested to receive more feedback.
>>> So if you're curious, you can try it here:
>>>
>>> http://www.biodalliance.org/human/ncbi36/
>>>
>>> It's a fully-fledged DAS/1.53 client (with a few bits of DAS/1.6, and
>>> hopefully rather more coming soon), but has one major caveat: since it's
>>> pure Javascript code running in your web browser, there are limitations to
>>> which servers it can connect to. Specifically, it will only work with DAS
>>> servers that implement the W3C cross-origin resource sharing model (which
>>> has been discussed on this list before, but drop me a line if you've got any
>>> questions). What does this mean in practice? If you're adding datasources
>>> from the registry, things are simple because Dalliance will only allow you
>>> to add CORS-enabled sources (a huge thanks to Jonathan Warren for adding
>>> some support for this in the registry). If you run your own DAS servers and
>>> don't list them in the registry, you'll need to check for CORS compatibility
>>> yourself. The latest versions of Proserver and Dazzle should both be okay.
>>>
>>> All comments, suggestions, and bug reports are welcome!
>>>
>>> Thomas Down.
>>> _______________________________________________
>>> DAS mailing list
>>> DAS at lists.open-bio.org
>>> http://lists.open-bio.org/mailman/listinfo/das
>>
>> Jonathan Warren
>> Senior Developer and DAS coordinator
>> blog: http://biodasman.wordpress.com/
>> jw12 at sanger.ac.uk
>> Ext: 2314
>> Telephone: 01223 492314
>>
>>
>>
>>
>>
>>
>>
>>
>>
>
> _______________________________________________
> DAS mailing list
> DAS at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/das
More information about the DAS
mailing list