javascript - backbonejs cookie not maintained across cross domains -
i have backbone marionette application makes rest api calls.
in model when make api call login session value , see cookie being set in browser
immediately after when make call user information logged in receive different session or cookie value , no user found. cors enabled , options calls being made.
when hook api other applications build off non backbone libraries works fine. know how solve this?
here post
dologin: function( data ){ this.fetch({ data: json.stringify(data), type: 'post', contenttype: 'application/json', error:(function (e) { alert('error'); }) }); },
it not clear on piece of code looks calls going different domains (once mentioned cors).
if case, afraid session , cookie might different because specific domain 1st request (dologin) reached not 2nd request (fetch). more info: sharing cookies across different domains , different applications (classic asp , asp.net)
another thing if both servers support cors because 1 part of setup client-side , server-side (headers). more info on: http://www.html5rocks.com/en/tutorials/cors/
Comments
Post a Comment