Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Add use of rotating secure key for session

  • Loading branch information...
commit 621327810f4e73c5728d294ae828da1d31bdfea0 1 parent 868f861
Ryan Daigle authored October 10, 2012

Showing 1 changed file with 5 additions and 1 deletion. Show diff stats Hide diff stats

  1. 6  config/initializers/secret_token.rb
6  config/initializers/secret_token.rb
@@ -4,4 +4,8 @@
4 4
 # If you change this key, all old signed cookies will become invalid!
5 5
 # Make sure the secret is at least 30 characters and all random,
6 6
 # no regular words or you'll be exposed to dictionary attacks.
7  
-Gisted::Application.config.secret_token = 'd2fc36f9a6de8e58fd820e72a2338affcd745548c5fa03045d1abdc13b37dee5165d3b02623c3147ceaead31688199650996c4404434e50b3f1cbce926c54b0a'
  7
+Gisted::Application.config.secret_token = begin
  8
+  ENV['SECUREKEY_BROWN_KEY'].split(",").first
  9
+rescue
  10
+  'd2fc36f9a6de8e58fd820e72a2338affcd745548c5fa03045d1abdc13b37dee5165d3b02623c3147ceaead31688199650996'
  11
+end

0 notes on commit 6213278

Please sign in to comment.
Something went wrong with that request. Please try again.