Skip to content

Commit

Permalink
chore: Remove SECRET_KEY from source control
Browse files Browse the repository at this point in the history
- remove the SECRET_KEY from source control and use and environment
  variable to access it
- update app.json file to pull the SECRET_KEY from staging
  • Loading branch information
karuhanga committed Jan 30, 2019
1 parent 8f4e3dc commit 45f53f7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
"env": {
"STAGING_DATABASE_URL": {
"required": true
},
"SECRET_KEY": {
"required": true
}
},
"formation": {},
Expand Down
2 changes: 1 addition & 1 deletion authors/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '7pgozr2jn7zs_o%i8id6=rddie!*0f0qy3$oy$(8231i^4*@u3'
SECRET_KEY = os.environ.get('SECRET_KEY')

# locations this application can be hosted
ALLOWED_HOSTS = [".herokuapp.com", "127.0.0.1", "localhost"]
Expand Down

0 comments on commit 45f53f7

Please sign in to comment.