Open marklagendijk opened 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.
@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.
@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.
@robesz I confirm!
In the JayData 1.3.5 release notes it states:
datajs 1.1.1 doesn't allow custom HTTP headers set by context.prepareRequest()
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.