mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-16 20:49:00 -04:00
update csp using variables and testing
This commit is contained in:
@@ -141,6 +141,8 @@ navigation = {
|
||||
def _csp(config):
|
||||
asset_domain = config["ASSET_DOMAIN"]
|
||||
logo_domain = config["LOGO_CDN_DOMAIN"]
|
||||
api_public_url = config["API_PUBLIC_URL"]
|
||||
api_public_ws_url = config["API_PUBLIC_WS_URL"]
|
||||
|
||||
return {
|
||||
"default-src": ["'self'", asset_domain],
|
||||
@@ -166,14 +168,8 @@ def _csp(config):
|
||||
"'self'",
|
||||
"https://gov-bam.nr-data.net",
|
||||
"https://www.google-analytics.com",
|
||||
"http://localhost:6011",
|
||||
"ws://localhost:6011",
|
||||
"https://notify-api-staging.app.cloud.gov",
|
||||
"wss://notify-api-staging.app.cloud.gov",
|
||||
"https://notify-api-demo.app.cloud.gov",
|
||||
"wss://notify-api-demo.app.cloud.gov",
|
||||
"https://notify-api-production.app.cloud.gov",
|
||||
"wss://notify-api-production.app.cloud.gov",
|
||||
f"{api_public_url}",
|
||||
f"{api_public_ws_url}",
|
||||
],
|
||||
"style-src": ["'self'", asset_domain],
|
||||
"img-src": ["'self'", asset_domain, logo_domain],
|
||||
|
||||
Reference in New Issue
Block a user