How do I set the session cookie's HttpOnly setting to false?

kingjeffrey picture kingjeffrey · Apr 21, 2010 · Viewed 8k times · Source

In Ruby on Rails, how do I set the session cookie's httpOnly setting to false?

Answer

troelskn picture troelskn · Jul 12, 2013

In Rails 4, you need to edit config/initializers/session_store.rb

Rails.application.config.session_store(
  :cookie_store,
  key: '_socializus_session',
  httponly: false,
)