mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 15:20:13 +01:00
create secrets.yml per rails upgrade instructions. It uses the secret key from site.yml
This commit is contained in:
parent
296cd8e152
commit
1d242981d4
3 changed files with 11 additions and 15 deletions
|
|
@ -1,12 +0,0 @@
|
|||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# Your secret key is used 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.
|
||||
# You can use `rake secret` to generate a secure secret key.
|
||||
|
||||
# Make sure your secret_key_base is kept private
|
||||
# if you're sharing your code publicly.
|
||||
Rails.application.config.secret_key_base = SITE_CONFIG["secret_token"] || SecureRandom.hex(64)
|
||||
8
config/secrets.yml
Normal file
8
config/secrets.yml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
development:
|
||||
secret_key_base: <%= SITE_CONFIG["secret_token"] || SecureRandom.hex(64) %>
|
||||
|
||||
test:
|
||||
secret_key_base: <%= SITE_CONFIG["secret_token"] || SecureRandom.hex(64) %>
|
||||
|
||||
production:
|
||||
secret_key_base: <%= SITE_CONFIG["secret_token"] || SecureRandom.hex(64) %>
|
||||
|
|
@ -23,10 +23,10 @@ secure_cookies: false
|
|||
# Make sure the secret is at least 30 characters and all random,
|
||||
# no regular words or you'll be exposed to dictionary attacks.
|
||||
#
|
||||
# if you want a nice random key, run this in rails console and copy-and-paste
|
||||
# the result:
|
||||
# if you want a nice random key, run this from the tracks directory and
|
||||
# copy-and-paste the result:
|
||||
#
|
||||
# SecureRandom.hex(64)
|
||||
# rake secret
|
||||
#
|
||||
secret_token: "change-me"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue