-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed django-csp, CSP now via nginx
CSP fix for #1214.
- Loading branch information
1 parent
c43f158
commit 23fc628
Showing
13 changed files
with
2 additions
and
22 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
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
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
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
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
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
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
include http.headers; | ||
include hsts.header; | ||
include conf.d/csp.header; |
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
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
add_header 'Content-Security-Policy' "base-uri 'self' https://*.${INTERNETNL_DOMAINNAME}; form-action 'self' https://*.${INTERNETNL_DOMAINNAME}; frame-ancestors 'none'; default-src 'self' https://*.${INTERNETNL_DOMAINNAME}"; |
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 |
---|---|---|
|
@@ -27,7 +27,6 @@ export [email protected] | |
### String, e-mail address | ||
export SERVER_EMAIL=[email protected] | ||
### CSV String | ||
export CSP_DEFAULT_SRC='self',https://*.internet.nl | ||
### CSV String | ||
export INTERNAL_IPS="localhost,127.0.0.1" | ||
### String | ||
|
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 |
---|---|---|
|
@@ -50,8 +50,6 @@ | |
ADMIN_NAME = getenv("ADMIN_NAME", "Administrator") | ||
ADMIN_EMAIL = getenv("ADMIN_EMAIL", "Administrator") | ||
SERVER_EMAIL = getenv("SERVER_EMAIL", "[email protected]") | ||
CSP_DEFAULT_SRC = split_csv_trim(getenv("CSP_DEFAULT_SRC", "'self',*.internet.nl")) | ||
CSP_BASE_URI = CSP_FORM_ACTION = CSP_DEFAULT_SRC | ||
INTERNAL_IPS = split_csv_trim(getenv("INTERNAL_IPS", "")) | ||
TIME_ZONE = getenv("TIME_ZONE", "UTC") | ||
|
||
|
@@ -186,11 +184,9 @@ | |
"django.contrib.messages.middleware.MessageMiddleware", | ||
"django_hosts.middleware.HostsResponseMiddleware", | ||
"internetnl.custom_middlewares.ActivateTranslationMiddleware", | ||
"csp.middleware.CSPMiddleware", | ||
] | ||
|
||
ADMINS = ((ADMIN_NAME, ADMIN_EMAIL),) | ||
CSP_FRAME_ANCESTORS = "'none'" | ||
ROOT_URLCONF = "internetnl.urls" | ||
ROOT_HOSTCONF = "internetnl.hosts" | ||
DEFAULT_HOST = "www" | ||
|
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
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