Skip to content

Remove hard-coded SECRET_KEY from production settings - #53

Merged
udaykor merged 2 commits into
aboutcode-org:developfrom
haikoschol:secret-key
Sep 18, 2019
Merged

Remove hard-coded SECRET_KEY from production settings#53
udaykor merged 2 commits into
aboutcode-org:developfrom
haikoschol:secret-key

Conversation

@haikoschol

Copy link
Copy Markdown
Collaborator

The changes were made on top of my branch for #47. So it makes sense to review/merge #52 first.

- Fix instructions for Debian-based distros
- Add instructions for running Postgres in Docker
- Set DJANGO_DEV=1 in runserver call to have localhost in
- ALLOWED_HOSTS

closes aboutcode-org#47

Signed-off-by: Haiko Schol <hs@haikoschol.com>
This change moves the hard-coded key to vulnerablecode/dev.py for
use during development (e.g. DJANGO_DEV is set).

Otherwise the key is read from an environment variable with the
same name. The advantage of this approach over using a gitignored
file containing the secret is that it works with deployment
environments that use ephemeral filesystems, such as Heroku.

closes aboutcode-org#46

Signed-off-by: Haiko Schol <hs@haikoschol.com>

@udaykor udaykor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes can be merged. This is a good idea to ensure dev settings are used safely.

@udaykor
udaykor merged commit 42f4668 into aboutcode-org:develop Sep 18, 2019
@haikoschol
haikoschol deleted the secret-key branch April 10, 2023 00:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants