-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
settings: Remove allow CIDR middleware, not necessary any more, and i…
…s unmaintained and insecure.
- Loading branch information
Showing
2 changed files
with
0 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,23 +65,11 @@ def custom_show_toolbar(request): | |
# Do not redirect to HTTPS, because the nginx proxy container only listens on HTTP | ||
SECURE_SSL_REDIRECT = False | ||
|
||
# Add allow cidr middleware as first middleware | ||
MIDDLEWARE = ["allow_cidr.middleware.AllowCIDRMiddleware"] + MIDDLEWARE | ||
|
||
# Allowed hosts -- localhost and 127.0.0.1 are always allowed, the rest comes from an environment variable. | ||
ALLOWED_HOSTS = [ | ||
"localhost", "127.0.0.1" | ||
] + env.list("DJANGO_ALLOWED_HOSTS", default=[]) | ||
|
||
# Allowed CIDR nets -- for kubernetes internal services | ||
ALLOWED_CIDR_NETS = ['172.30.0.0/16'] | ||
ALLOWED_CIDR_NETS.extend(env.list("DJANGO_ALLOWED_CIDR_NETS", default=[])) | ||
|
||
# Add Kubernetes POD IP, if running in Kubernetes | ||
KUBE_POD_IP = env("THIS_POD_IP", default="") | ||
if KUBE_POD_IP: | ||
ALLOWED_CIDR_NETS.append(KUBE_POD_IP) | ||
|
||
# Example: DJANGO_ADMINS="Jan Janssen <[email protected]>, Bob de Bouwer <[email protected]>" | ||
ADMINS = getaddresses([env("DJANGO_ADMINS", default="WWW-committee <[email protected]>")]) | ||
MANAGERS = ADMINS | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters