mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-11 10:28:41 -04:00
Fixed security issue and noscript iframe
This commit is contained in:
@@ -169,6 +169,10 @@ def _csp(config):
|
|||||||
|
|
||||||
|
|
||||||
def create_app(application):
|
def create_app(application):
|
||||||
|
@application.after_request
|
||||||
|
def add_csp_header(response):
|
||||||
|
response.headers['Content-Security-Policy'] = "frame-src https://www.googletagmanager.com"
|
||||||
|
return response
|
||||||
# @application.context_processor
|
# @application.context_processor
|
||||||
# def inject_feature_flags():
|
# def inject_feature_flags():
|
||||||
# this is where feature flags can be easily added as a dictionary within context
|
# this is where feature flags can be easily added as a dictionary within context
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
<script nonce="{{ csp_nonce() }}">document.body.className = ((document.body.className) ? document.body.className + ' js-enabled' : 'js-enabled');</script>
|
<script nonce="{{ csp_nonce() }}">document.body.className = ((document.body.className) ? document.body.className + ' js-enabled' : 'js-enabled');</script>
|
||||||
{% block bodyStart %}
|
{% block bodyStart %}
|
||||||
{% block extra_javascripts_before_body %}
|
{% block extra_javascripts_before_body %}
|
||||||
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-WX5NGWF"
|
<noscript><iframe sandbox src="https://www.googletagmanager.com/ns.html?id=GTM-WX5NGWF"
|
||||||
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
Generated
+22
-172
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user