Andy
2009-May-22 14:24 UTC
How can I read a cookie set on another subdomain by a non-Rails app?
I''m trying to build some single sign on functionality into our web application. There''s community site on a subdomain: i.e. community.domain.com The Rails app is on: www.domain.com When I inspect the cookies, I don''t see any of the "community.domain.com" cookies. In "production.rb", I have this: ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS.update (:session_domain => ''.domain.com'') That doesn''t seem to help. How can I get my "www" app to read from the "community" subdomain? Thanks, Andy
Frederick Cheung
2009-May-22 14:37 UTC
Re: How can I read a cookie set on another subdomain by a non-Rails app?
On May 22, 3:24 pm, Andy <andym...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> In "production.rb", I have this: > ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS.update > (:session_domain => ''.domain.com'') > > That doesn''t seem to help. > > How can I get my "www" app to read from the "community" subdomain? >what is the app setting the cookies doing ? if it''s setting them for community.domain.com rather than .domain.com then you can''t get them because the browser won''t be sending them Fred> Thanks, > Andy
Andy
2009-May-22 15:01 UTC
Re: How can I read a cookie set on another subdomain by a non-Rails app?
I have no control over what the "community.domain.com" server does. It''s a hosted application. So you''re saying that the browser won''t be sending cookies from "community.domain.com" for use on other subdomains? Thanks, Andy On May 22, 10:37 am, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On May 22, 3:24 pm, Andy <andym...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > In "production.rb", I have this: > > ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS.update > > (:session_domain => ''.domain.com'') > > > That doesn''t seem to help. > > > How can I get my "www" app to read from the "community" subdomain? > > what is the app setting the cookies doing ? if it''s setting them for > community.domain.com rather than .domain.com then you can''t get them > because the browser won''t be sending them > > Fred > > > Thanks, > > Andy > >
Frederick Cheung
2009-May-22 15:39 UTC
Re: How can I read a cookie set on another subdomain by a non-Rails app?
On May 22, 4:01 pm, Andy <andym...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I have no control over what the "community.domain.com" server does. > It''s a hosted application. > > So you''re saying that the browser won''t be sending cookies from > "community.domain.com" for use on other subdomains? >correct (see http://tools.ietf.org/html/rfc2965 ) (unless the subdomain was something.community.domain.com) Fred> Thanks, > Andy > > On May 22, 10:37 am, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: > > > On May 22, 3:24 pm, Andy <andym...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > In "production.rb", I have this: > > > ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS.update > > > (:session_domain => ''.domain.com'') > > > > That doesn''t seem to help. > > > > How can I get my "www" app to read from the "community" subdomain? > > > what is the app setting the cookies doing ? if it''s setting them for > > community.domain.com rather than .domain.com then you can''t get them > > because the browser won''t be sending them > > > Fred > > > > Thanks, > > > Andy