Skip to content

Commit 3843703

Browse files
committed
enable configuration of allowed host
1 parent adf86fd commit 3843703

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

README.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,9 @@ 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
163166

164167
Using Nix
165168
~~~~~~~~~

vulnerablecode/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
DEBUG = False
2929

3030
ALLOWED_HOSTS = [
31-
".herokuapp.com",
31+
os.environ.get("VC_ALLOWED_HOSTS", ".herokuapp.com"),
3232
]
3333

3434
# Application definition

0 commit comments

Comments
 (0)