Project

General

Profile

Task #6780

Story #6716: Production-ready DataONE theme

Task #6762: User testing at DUG July 12

Task #6774: Find bugs and inconsistencies in different browsers and OS

Cross-origin resource sharing issues in IE and some versions of FF

Added by Lauren Walker almost 7 years ago. Updated almost 7 years ago.

Status:
Resolved
Priority:
High
Assignee:
Target version:
Start date:
06/09/2015
Due date:
% Done:

0%

Estimated time:

Description

Oh, IE....

Looking into JSONP (http://json-jsonp-tutorial.craic.com/index.html)


Related issues

Related to MetacatUI - Task #6781: Enable content proxying on the host running MetacatUIResolved06/18/2015

History

#1 Updated by Lauren Walker almost 7 years ago

  • Priority changed from Normal to High

Cross-domain requests are being blocked by IE 8-9, Firefox on Windows, and Safari on Windows. This means that https://search.test.dataone.org cannot query Solr on cn.dataone.org with the current way requests are being sent. This hasn't been an issue before because most of our development is done on Macs and have been pointing to a Solr index on the same domain.

Looks like Solr has a JSONP feature: http://wiki.apache.org/solr/SolJSON

I will need to send a "json.wrf" parameter with all Solr queries so that the JSON response is returned wrapped in a function, and therefore (annoyingly) accepted by IE, Firefox, and Safari in Windows.

#2 Updated by ben leinfelder almost 7 years ago

Seems like the simpler/better solution would be to bring the UI deployment into the same domain as the SOLR index it is querying. It's probably confusing to have a test domain utilize production data, anyway. So this prohibition may have a silver lining and actually keep us out of trouble.

#3 Updated by Lauren Walker almost 7 years ago

It wasn't even working from say, search.test.dataone.org to cn-sandbox-2.test.dataone.org

#4 Updated by ben leinfelder almost 7 years ago

Okay, so that's a same-origin issue not so much a cross-domain issue. Similar, but different, right?

#5 Updated by Lauren Walker almost 7 years ago

  • translation missing: en.field_remaining_hours set to 0.0
  • Status changed from New to Resolved
  • Subject changed from Cross-domain request issues in IE to Cross-origin resource sharing issues in IE and some versions of FF

For 1.7.0, CORS is now working for JSON responses in IE 8+, and recent versions of Firefox. XML responses are still blocked by IE and I couldn't find a client-side solution to this, so at least for now MetacatUI will store a back-up XML file of the node info to use for building the Member Node filter list in the DataONE theme. Other cross-origin XML resources (e.g. getSubjectInfo()) will need to be fixed on the server side, by either using a proxy server or enabling JSONP responses.

Also available in: Atom PDF