Guest User

Untitled

a guest
May 24th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. # Force all environments to use the same logger level
  2. # (by default production uses :info, the others :debug)
  3. # config.log_level = :debug
  4.  
  5. # Your secret key for verifying cookie session data integrity.
  6. # If you change this key, all old sessions will become invalid!
  7. # Make sure the secret is at least 30 characters and all random,
  8. # no regular words or you'll be exposed to dictionary attacks.
  9. secret_file = File.join(RAILS_ROOT, "secret")
  10. if File.exist?(secret_file)
  11. secret = File.read(secret_file)
  12. else
  13. secret = Rails::SecretKeyGenerator.new("insoshi").generate_secret
  14. File.open(secret_file, 'w') { |f| f.write(secret) }
  15. end
  16. config.action_controller.session = {
  17. :session_key => '_instant_social_session',
  18. :secret => secret
  19. }
Add Comment
Please, Sign In to add comment