tracks/config/initializers/secret_token.rb
Reinier Balt c6e526127c Use setting from stie.yml instead of hardcoded secret token
Fallback to randomly generated token, which is fine for development and test mode. (Sessions will be invalidated when the server reboots)

Thanks @brynary
2013-05-07 09:21:22 +02:00

7 lines
No EOL
420 B
Ruby

# Be sure to restart your server when you modify this file.
# Your secret key for verifying the integrity of signed cookies.
# If you change this key, all old signed cookies will become invalid!
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
Tracksapp::Application.config.secret_token = SITE_CONFIG["secret_token"] || SecureRandom.hex(64)