]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
settings: Wildcard 'ALLOWED_HOSTS' settings
authorStephen Finucane <stephen@that.guru>
Tue, 7 Feb 2017 21:47:16 +0000 (21:47 +0000)
committerStephen Finucane <stephen@that.guru>
Wed, 1 Mar 2017 22:11:04 +0000 (22:11 +0000)
Django 1.10.3, 1.9.11 and 1.8.16 changed default behavior for
ALLOWED_HOSTS to prevent DNS rebinding attacks [1]. Unfortunately this
also means we can't access the development Docker or Vagrant installs
by IP address. Sidestep the issue by wildcarding the 'ALLOWED_HOSTS'
setting for development, thus allowing connections from any IP.

[1] https://docs.djangoproject.com/en/1.10/ref/settings/#allowed-hosts

Signed-off-by: Stephen Finucane <stephen@that.guru>
Reviewed-by: Daniel Axtens <dja@axtens.net>
patchwork/settings/dev.py

index a084d6a17caac83a15dd27ff2ed6639afdf44e07..ee5b203d6e801492f5740bc0cc44fd45cd8d5128 100644 (file)
@@ -18,6 +18,9 @@ from .base import *  # noqa
 # https://docs.djangoproject.com/en/1.8/ref/settings/#core-settings
 #
 
+
+ALLOWED_HOSTS = ['*']
+
 SECRET_KEY = '00000000000000000000000000000000000000000000000000'  # noqa
 
 DEBUG = True