Modifying the session :key

Hello,

I have my base session settings in config/initializers/session_store.rb

I want to override the :key option in one of my environment files. I’m
attempting to do so like this…

config.action_controller.session[:key] = ‘_new_sesssion_key’

But when I examine the cookies for the site, it’s using the :key set in
the config/initializers/session_store.rb still.

Any idea how I go about overriding the :key in my environment files?

Thanks,
Andrew

Andrew K. wrote:

Hello,

I have my base session settings in config/initializers/session_store.rb

I want to override the :key option in one of my environment files. I’m
attempting to do so like this…

config.action_controller.session[:key] = ‘_new_sesssion_key’

But when I examine the cookies for the site, it’s using the :key set in
the config/initializers/session_store.rb still.

Any idea how I go about overriding the :key in my environment files?

Thanks,
Andrew

I’m just moving the settings in config/initializers/session_store.rb to
environment.rb and overriding in my other environment file for the time
being which seems to work.