Compare commits

...

2 Commits

Author SHA1 Message Date
alexjanousekGSA
a962da9c7d Added existing csp header 2025-04-10 12:15:34 -04:00
alexjanousekGSA
3a468c77aa Fixed unit test 2025-04-10 08:20:47 -04:00

View File

@@ -171,7 +171,8 @@ def _csp(config):
def create_app(application):
@application.after_request
def add_csp_header(response):
response.headers['Content-Security-Policy'] = "frame-src https://www.googletagmanager.com"
existing_csp = response.headers.get("Content-Security-Policy", "")
response.headers["Content-Security-Policy"] = existing_csp + "; form-action 'self';"
return response
# @application.context_processor
# def inject_feature_flags():