Skip to content

Commit 8bac412

Browse files
authored
1 parent ed1f1b8 commit 8bac412

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

gettingstarted/settings.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@
4444
if not IS_HEROKU:
4545
DEBUG = True
4646

47-
# Generally avoid wildcards(*). However since Heroku router provides hostname validation it is ok
47+
# On Heroku, it's safe to use a wildcard for `ALLOWED_HOSTS``, since the Heroku router performs
48+
# validation of the Host header in the incoming HTTP request. On other platforms you may need
49+
# to list the expected hostnames explicitly to prevent HTTP Host header attacks. See:
50+
# https://docs.djangoproject.com/en/4.2/ref/settings/#std-setting-ALLOWED_HOSTS
4851
if IS_HEROKU:
4952
ALLOWED_HOSTS = ["*"]
5053
else:

0 commit comments

Comments
 (0)