mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-26 04:21:36 +00:00
Add a WIP non-encrypted cookie store for gathers
Not used atm.
This commit is contained in:
parent
7600e58673
commit
1c5ec4cbf1
1 changed files with 11 additions and 1 deletions
|
@ -13,6 +13,15 @@ Bundler.require(*Rails.groups)
|
||||||
# FIXME
|
# FIXME
|
||||||
ActionController::Parameters.permit_all_parameters = true
|
ActionController::Parameters.permit_all_parameters = true
|
||||||
|
|
||||||
|
class ActionDispatch::Session::MyCustomStore < ActionDispatch::Session::CookieStore
|
||||||
|
private
|
||||||
|
|
||||||
|
def cookie_jar(request)
|
||||||
|
request.cookie_jar.signed
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
module Ensl
|
module Ensl
|
||||||
class Application < Rails::Application
|
class Application < Rails::Application
|
||||||
# Custom error pages
|
# Custom error pages
|
||||||
|
@ -32,7 +41,8 @@ module Ensl
|
||||||
config.autoload_paths += Dir["#{config.root}/app/services/**/", "#{config.root}/app/models/concerns/"]
|
config.autoload_paths += Dir["#{config.root}/app/services/**/", "#{config.root}/app/models/concerns/"]
|
||||||
|
|
||||||
# Be sure to restart your server when you modify this file.
|
# Be sure to restart your server when you modify this file.
|
||||||
config.session_store :cookie_store, key: '_ensl_session'
|
config.session_store :cookie_store, key: '_ENSL_session_key'
|
||||||
|
# config.session_store :my_custom_store, key: '_ENSL_session_key'
|
||||||
|
|
||||||
# Load secrets from .env
|
# Load secrets from .env
|
||||||
ENV['APP_SECRET'] ||= (0...32).map { (65 + rand(26)).chr }.join
|
ENV['APP_SECRET'] ||= (0...32).map { (65 + rand(26)).chr }.join
|
||||||
|
|
Loading…
Reference in a new issue