Replies: 1 comment 1 reply
-
This is needed, anyone has any idea how we can achieve this? maybe @womblep ? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We're working on a Rails application that uses subdomains. We need to have a different session for different subdomains:
app.example.com
should use the "default" sessionabc.example.com
should use a session that's only for theabc
domaindemo.example.com
should use a session that's only for thedemo
domainOne potential solution is to change the session key before each request based on the subdomain. The idea is to do that in a middleware.
A similar question was asked before - rack/rack#1155.
The proposed solution was to change the key by accessing the session options:
However, as the author of the previous question/issue explained:
Latter, the instance variable is used to fetch the session ID.
So, changing the session key like this:
Doesn't have any effect on the instance variable.
At the moment, we're using Rack 2.2.8.
Is there something obvious that we're missing? Thank you.
Beta Was this translation helpful? Give feedback.
All reactions