jaystack / jaydata

Notice: this library isn't maintained anymore
http://jaydata.org
GNU General Public License v2.0
354 stars 95 forks source link

Incorrect 'known issue' #153

Open marklagendijk opened 10 years ago

marklagendijk commented 10 years ago

In the JayData 1.3.5 release notes it states:

However, this is incorrect. I am using JayData with datajs and an OData 3 webservice, and setting the headers is working as expected.

See this Stackoverflow question.

robesz commented 10 years ago

Thanks for the feedback. Which header did you add? was it a standard or a custom one? As far as I know custom ones (such as HTTP-HELLO-MARK) are dropped by datajs.

marklagendijk commented 10 years ago

@robesz a custom one. The problem wasn't with datajs, but with the fact that you have to explicitly allow each custom header, when doing a CORS request. See the Stackoverflow question, both @Jmorvan and @RainerAtSpirit verified this observation.

RainerAtSpirit commented 10 years ago

@robesz: context.prepareRequest() works in datajs.1.1.1, but you're correct there might be other oddities when dealing with CORS. Setting up a proxy, if you control this part of the app, typically resolves these.

jmorvan commented 10 years ago

@robesz I confirm!