javascript - Browsers are not setting cookies although I have Set-Cookie in response -
i have api endpoint static s3 hosted site. s3 site lives on domain name: www.mysite.com
my api (django) runs on site domain name: api.mysite.com
when use login button on site , sign in using proper username/password django sends response set-cookie browser doesn't set cookies. can see full response below,
request url:http://api.mysite.com:8000/api/form/login/ request method:post status code:200 ok request headersview source accept:*/* accept-charset:iso-8859-1,utf-8;q=0.7,*;q=0.3 accept-encoding:gzip,deflate,sdch accept-language:en-us,en;q=0.8 cache-control:no-cache connection:keep-alive content-length:46 content-type:application/x-www-form-urlencoded; charset=utf-8 host:api.mysite.com:8000 origin:http://mysite.com pragma:no-cache referer:http://mysite.com/eventform.html user-agent:mozilla/5.0 (x11; linux x86_64) applewebkit/537.22 (khtml, gecko) ubuntu chromium/25.0.1364.160 chrome/25.0.1364.160 safari/537.22 form dataview sourceview url encoded token:68f4ebd02c0e1915d3e3110a04fccb0ab670aeab response headersview source access-control-allow-origin:* content-type:text/html; charset=utf-8 date:mon, 13 may 2013 22:21:54 gmt server:wsgiserver/0.1 python/2.7.3 set-cookie:sessionid=3kn2hovtweeofalf00ld3lowb6yvete; domain=.mysite.com; expires=mon, 27-may-2013 22:21:54 gmt; max-age=1209600; path=/ vary:cookie
note line set-cookie:sessionid=3kn2hovtweeofalf00ld3lowb6yvete; domain=.mysite.com; expires=mon, 27-may-2013 22:21:54 gmt; max-age=1209600; path
=/
in django have session_cookie_domain = '.mysite.com'
but i've tried changing 'mysite.com' , '' neither of has allowed browser set returned cookie.
www.msyite.com static site hosted on amazon s3 i'm using django api/backend data.
when render login pages using django work fine (login/logout cookies , sessions work fine, know it's not django code) when using s3 or python simplehttpserver browser doesn't set returned cookie.
thanks in advance!
afaik purpose of static s3 site not set/accept cookies @ all?
we're using static content images in order rid of cookie stuff , not have overload in request during image or css requests.
and: s3 not usual web server, behaves different, rtm highly recommended. it's weired, true, answer distilled thread can s3 set user cookie? "no."
Comments
Post a Comment