Skip to content
This repository has been archived by the owner on May 26, 2022. It is now read-only.

Commit

Permalink
Merge pull request #216 from glogiotatidis/cidr
Browse files Browse the repository at this point in the history
Add django-allow-cidr to fix ELB health checks
  • Loading branch information
glogiotatidis authored Feb 22, 2018
2 parents c41d16b + 8ac0abb commit 70ea7a8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions careers/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
DEBUG = config('DEBUG', cast=bool)

ALLOWED_HOSTS = config('ALLOWED_HOSTS', cast=Csv())
ALLOWED_CIDR_NETS = config('ALLOWED_CIDR_NETS', default='', cast=Csv())


# Application definition
Expand All @@ -53,6 +54,7 @@
INSTALLED_APPS.append(app)

MIDDLEWARE_CLASSES = (
'allow_cidr.middleware.AllowCIDRMiddleware',
'django.middleware.security.SecurityMiddleware',
'whitenoise.middleware.WhiteNoiseMiddleware',
'careers.base.middleware.LocaleRedirectionMiddleware',
Expand Down Expand Up @@ -204,6 +206,9 @@
SECURE_BROWSER_XSS_FILTER = config('SECURE_BROWSER_XSS_FILTER', default=False, cast=bool)
SECURE_CONTENT_TYPE_NOSNIFF = config('SECURE_CONTENT_TYPE_NOSNIFF', default=False, cast=bool)
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
SECURE_REDIRECT_EXEMPT = [
r'^healthz/$',
]

CACHES = {
'default': config('CACHE_URL', default='locmem://', cast=django_cache_url.parse),
Expand Down
6 changes: 6 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -295,3 +295,9 @@ ipaddress==1.0.18 \
webencodings==0.5.1 \
--hash=sha256:a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78 \
--hash=sha256:b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923
django-allow-cidr==0.3.0 \
--hash=sha256:63436f3820dd788863ef35f4fad5499f5ad23063b52033b03afdb1df7929797f \
--hash=sha256:f19558a27ea558ad2174d15874f8eaf36d9e50e16587c7558d2a3bdc69c0d3bb
netaddr==0.7.19 \
--hash=sha256:56b3558bd71f3f6999e4c52e349f38660e54a7a8a9943335f73dfc96883e08ca \
--hash=sha256:38aeec7cdd035081d3a4c306394b19d677623bf76fa0913f6695127c7753aefd

0 comments on commit 70ea7a8

Please sign in to comment.