What I've noticed - the session key ("_session_id") looks like kind of a default key - in our configuration we are using different key name, so when we would try to fetch sesssion.id we'll get nil, because parent app stores session under different key.
So here I can see way more details and options, also the key matches the one we've configured ("_hub_session"). Looks like when we are adding a middleware in after_initialize block it somehow overrides some of the configs from the base/parent app 🤔 .
Describe the bug Hey guys 👋 . Recently we've migrated from using ActiveRecord Session Store (https://github.com/rails/activerecord-session_store) to redis_store (https://github.com/redis-store/redis-actionpack). After this change our Sail Dashboard stopped working:
When debugging from within Sails:
What I've noticed - the session key ("_session_id") looks like kind of a default key - in our configuration we are using different key name, so when we would try to fetch sesssion.id we'll get nil, because parent app stores session under different key.
When I've updated this line https://github.com/vinistock/sail/blob/7da7c74031ea51a652330f283a95eab52d485188/lib/sail/engine.rb#L42 to
Everything works as expected - dashboard loads, and when debugging and checking whats inside session object:
So here I can see way more details and options, also the key matches the one we've configured ("_hub_session"). Looks like when we are adding a middleware in after_initialize block it somehow overrides some of the configs from the base/parent app 🤔 .
Environment Gemfile
To Reproduce Steps to reproduce the behavior: Install 'redis-actionpack' gem, create app/initializers/session_store.rb
routes:
Login and visit localhost:3000/sail
Expected behavior User should see a Sail Dashboard
Actual behavior User sees an error page.