Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 462
kingjeffrey Avatar asked Apr 21 '10 01:04

kingjeffrey


2 Answers

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

Rails.application.config.session_store(
  :cookie_store,
  key: '_socializus_session',
  httponly: false,
)
like image 164
troelskn Avatar answered Sep 22 '22 14:09

troelskn


This is how i did it with Rails 3:

Testapp::Application.config.session_store :cookie_store, key: '_testapp_session', :domain => :all, :httponly => false
like image 27
sailor Avatar answered Sep 19 '22 14:09

sailor