How can I read a cookie set on another subdomain by a non-Rails app?


#1

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


#2

On May 22, 3:24 pm, Andy removed_email_address@domain.invalid 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


#3

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 C. removed_email_address@domain.invalid


#4

On May 22, 4:01 pm, Andy removed_email_address@domain.invalid 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