When no cache store is set use cookie storage for sessions
A change in the default configuration of development environments in rails 5.1 means that caching is now disabled by default so in that case fall back to using cookies instead. Closes #1666
This commit is contained in:
parent
236869eb73
commit
96a00910d5
1 changed files with 3 additions and 1 deletions
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
if defined?(MEMCACHE_SERVERS)
|
if defined?(MEMCACHE_SERVERS)
|
||||||
Rails.application.config.session_store :mem_cache_store, :memcache_server => MEMCACHE_SERVERS, :namespace => "rails:session", :key => "_osm_session"
|
Rails.application.config.session_store :mem_cache_store, :memcache_server => MEMCACHE_SERVERS, :namespace => "rails:session", :key => "_osm_session"
|
||||||
else
|
elsif Rails.application.config.cache_store != :null_store
|
||||||
Rails.application.config.session_store :cache_store, :key => "_osm_session"
|
Rails.application.config.session_store :cache_store, :key => "_osm_session"
|
||||||
|
else
|
||||||
|
Rails.application.config.session_store :cookie_store, :key => "_osm_session"
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue