and I share the same session across foo.chat.local, bar.chat.local
But it won’t share it with any of the other apps that I work with (eg
someotherapp.local). If you’re trying to have username.users.localhost
and name.blogs.localhost share sessions then that won’t work just like
that - the domain need to have more segments in common.
and I share the same session across foo.chat.local, bar.chat.local
But it won’t share it with any of the other apps that I work with (eg
someotherapp.local). If you’re trying to have username.users.localhost
and name.blogs.localhost share sessions then that won’t work just like
that - the domain need to have more segments in common.
i’ve just updated to rails 2.3.2 and set the session inizializer:
But the session isn’t shared with localhost and foo.users.localhost… so
i’ve tried to change another time the session_domain to “.users.local”,
“users.localhost”, “.users.localhost”, “.local”, “local”, “.localhost”
and “localhost”…and nothing… the session isn’t shared at all.
This is my subdomain config:
It’s just a single app which serve everything, not more different apps
for each subdomain. isn’t possible neither in this case to have
different subdomains (foo.users.domain.com and foo.blogs.domain.com for
the production; foo.users.localhost and foo.blogs.localhost for the
development)?
But the session isn’t shared with localhost and foo.users.localhost… so
Those are all really differnt domains. Setting the domain to
users.local would allow sharing with anything.users.local and
users.local but nothing more. Remember to restart the app between
changes
for each subdomain. isn’t possible neither in this case to have
different subdomains (foo.users.domain.com and foo.blogs.domain.com for
the production; foo.users.localhost and foo.blogs.localhost for the
development)?
you’d need something like
if RAILS_ENV==‘production’
config.action_controller.session = {
:session_domain => “domain.com”
…
else
end
but like I said foo.users.localhost and foo.blogs.localhost will never
be able to share cookies (and hence sessions. You need an intermediate
domain, eg foo.users.domain.localhost and foo.blogs.domain.localhost
Those are all really differnt domains. Setting the domain to
users.local would allow sharing with anything.users.local and
users.local but nothing more. Remember to restart the app between
changes
yep, i restart it everytime
you’d need something like
if RAILS_ENV==‘production’
config.action_controller.session = {
:session_domain => “domain.com”
…
else
end
or i could set it directly in the enviroment folder, for production.rb
and development.rb…
but like I said foo.users.localhost and foo.blogs.localhost will never
be able to share cookies (and hence sessions. You need an intermediate
domain, eg foo.users.domain.localhost and foo.blogs.domain.localhost
about the dev enviroment i don’t care too much, but the production env
in that case should works (as the intermediate domain would be the real
domain, so domain.localhost would be domain.com)
thank you
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.