Add option to disable pre-flight request for SPARQL store #679

Merged
merged 1 commit into from Feb 15, 2016

Conversation

Projects
None yet
2 participants
@cmdcolin
Contributor

cmdcolin commented Jan 17, 2016

Sometimes data providers reject the CORS preflight request, so this adds an option for disabling that, in particular for SPARQL data stores

This dojo FAQ page discusses the technique https://www.sitepen.com/blog/2014/01/15/faq-cors-with-dojo/

The Apollo hackathon uncovered that this patch was needed for a wikidata query

Ideally the data provider i.e. wikidata would accept the CORS request out of the box, but this seems like a needed workaround

@nathandunn

This comment has been minimized.

Show comment
Hide comment
@nathandunn

nathandunn Jan 17, 2016

Contributor

Looks good to me. I'll let @enuggetry have a final look at it. Just trying to think of a case where we would want to have enabled pre-flight requests.

Look at: http://stackoverflow.com/questions/15381105/cors-what-is-the-motivation-behind-introducing-preflight-requests . . . probably none.

Contributor

nathandunn commented Jan 17, 2016

Looks good to me. I'll let @enuggetry have a final look at it. Just trying to think of a case where we would want to have enabled pre-flight requests.

Look at: http://stackoverflow.com/questions/15381105/cors-what-is-the-motivation-behind-introducing-preflight-requests . . . probably none.

@cmdcolin cmdcolin removed the in progress label Jan 19, 2016

@cmdcolin

This comment has been minimized.

Show comment
Hide comment
@cmdcolin

cmdcolin Feb 12, 2016

Contributor

I added a couple changes to be more explicit about disabling the header. Should be ready now

Contributor

cmdcolin commented Feb 12, 2016

I added a couple changes to be more explicit about disabling the header. Should be ready now

@nathandunn

This comment has been minimized.

Show comment
Hide comment
@nathandunn

nathandunn Feb 15, 2016

Contributor

Looks good to me, has appropriate defaults.

Contributor

nathandunn commented Feb 15, 2016

Looks good to me, has appropriate defaults.

nathandunn added a commit that referenced this pull request Feb 15, 2016

Merge pull request #679 from GMOD/disable_preflight
Add option to disable pre-flight request for SPARQL store

@nathandunn nathandunn merged commit 3770503 into master Feb 15, 2016

1 check passed

continuous-integration/travis-ci/push The Travis CI build passed
Details

@nathandunn nathandunn deleted the disable_preflight branch Feb 15, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment