I have a Rails-API app. More or less \"out of the box\" but I want to add back cookie-based session store. Here is what I\'ve done:
app/controllers/application_contr
This line is ignored because you are not using the full Rails stack:
::Rails.application.config.session_store :cookie_store,
:key => '_namespace_key'
So instead, your session is using the default session key set here. However, you can pass these arguments directly by replacing:
config.middleware.insert_after
ActionDispatch::Cookies, ActionDispatch::Session::CookieStore
with:
config.middleware.insert_after
ActionDispatch::Cookies, ActionDispatch::Session::CookieStore,
:key => '_namespace_key'
Here's a full list of options you can pass (with a rough idea of their defaults, since some may be overridden by modules in Rails).