Skip to content

Commit

Permalink
Make session cookie last for two weeks to work around iOS bug
Browse files Browse the repository at this point in the history
Mobile Safari has a tendency to use cached form values even when the
cache control headers tell it otherwise. However the session cookie
has expired so when the form is submitted the CSRF token is invalid.

See rails/rails#21948 for further details.

Fixes #451.
  • Loading branch information
pixeltrix committed Apr 11, 2016
1 parent 4faaba1 commit fe9db94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/initializers/session_store.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Be sure to restart your server when you modify this file.

Rails.application.config.session_store :cookie_store, key: '_epets_session'
Rails.application.config.session_store :cookie_store, key: '_epets_session', expire_after: 2.weeks

0 comments on commit fe9db94

Please sign in to comment.