Skip to content

Commit 01b4045

Browse files
committed
enable configuration of allowed host
Signed-off-by: Pierre Tardy <pierre.tardy@renault.com>
1 parent adf86fd commit 01b4045

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

README.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,11 @@ for this purpose::
160160

161161
SECRET_KEY=$(python -c "from django.core.management import utils; print(utils.get_random_secret_key())")
162162

163+
You will also need to setup the VC_ALLOWED_HOSTS environment variable to match the hostname where the app is deployed::
164+
165+
VC_ALLOWED_HOSTS=vulnerablecode.your.domain.example.com
166+
167+
You can specify several host by separating them with a colon `:`
163168

164169
Using Nix
165170
~~~~~~~~~

vulnerablecode/settings.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@
2727
# SECURITY WARNING: don't run with debug turned on in production!
2828
DEBUG = False
2929

30-
ALLOWED_HOSTS = [
31-
".herokuapp.com",
32-
]
30+
ALLOWED_HOSTS = os.environ.get("VC_ALLOWED_HOSTS", "*").split(":")
3331

3432
# Application definition
3533

0 commit comments

Comments
 (0)