mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-05 14:11:41 -04:00
Make a few adjustments to match changes to the API:
* Updates the Makefile so make test works (removed js-lint action for now) * Addresses some outstanding linting/formatting * Updates dependencies and pulls in latest changes from main Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
This commit is contained in:
@@ -165,7 +165,7 @@ def _csp(config):
|
||||
"https://gov-bam.nr-data.net",
|
||||
"https://www.google-analytics.com",
|
||||
"http://localhost:6011",
|
||||
"ws://localhost:6011"
|
||||
"ws://localhost:6011",
|
||||
],
|
||||
"style-src": ["'self'", asset_domain],
|
||||
"img-src": ["'self'", asset_domain, logo_domain],
|
||||
@@ -176,15 +176,15 @@ def create_app(application):
|
||||
@application.after_request
|
||||
def add_csp_header(response):
|
||||
existing_csp = response.headers.get("Content-Security-Policy", "")
|
||||
response.headers["Content-Security-Policy"] = existing_csp + "; form-action 'self';"
|
||||
response.headers["Content-Security-Policy"] = (
|
||||
existing_csp + "; form-action 'self';"
|
||||
)
|
||||
return response
|
||||
|
||||
@application.context_processor
|
||||
def inject_feature_flags():
|
||||
# this is where feature flags can be easily added as a dictionary within context
|
||||
feature_socket_enabled = application.config.get(
|
||||
"FEATURE_SOCKET_ENABLED", False
|
||||
)
|
||||
feature_socket_enabled = application.config.get("FEATURE_SOCKET_ENABLED", False)
|
||||
return dict(
|
||||
FEATURE_SOCKET_ENABLED=feature_socket_enabled,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user