diff options
Diffstat (limited to 'config/initializers/session_store.rb')
-rw-r--r-- | config/initializers/session_store.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb new file mode 100644 index 0000000..4af1519 --- /dev/null +++ b/config/initializers/session_store.rb @@ -0,0 +1,6 @@ +if Rails.env.production? + # Only serve session cookies over HTTPS + Rails.application.config.session_store :cookie_store, key: 'map_session', expire_after: 7.days, httponly: true, secure: true +else + Rails.application.config.session_store :cookie_store, key: 'map_session', expire_after: 7.days +end |