Skip to content
This repository has been archived by the owner on Nov 19, 2023. It is now read-only.

Commit

Permalink
secure secret token
Browse files Browse the repository at this point in the history
  • Loading branch information
adamico committed Jun 28, 2013
1 parent b3f3c82 commit 90f136d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -96,3 +96,4 @@ vendor/extensions/**/spec/dummy
.rbenv-version

*.dump
.secret
6 changes: 5 additions & 1 deletion config/initializers/secret_token.rb
Expand Up @@ -4,4 +4,8 @@
# 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.
Afcrpv::Application.config.secret_token = '60f6dd5b39cdc55fcddc6d5f3462d58d60e8c10f820b0f6bf590f63723b280acf5c32c7d4365136d176dbf2c4895c5aa15d132e3fa00911fedf2c30304b81cf3'
def find_secure_token
Rails.env.development? ? '60f6dd5b39cdc55fcddc6d5f3462d58d60e8c10f820b0f6bf590f63723b280acf5c32c7d4365136d176dbf2c4895c5aa15d132e3fa00911fedf2c30304b81cf3' : ENV['APP_SECRET_TOKEN']
end

Afcrpv::Application.config.secret_token = find_secure_token

0 comments on commit 90f136d

Please sign in to comment.