diff --git a/app/__init__.py b/app/__init__.py index 4c24d5b28..770a42779 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -558,7 +558,7 @@ def useful_headers_after_request(response): "object-src 'self';" "font-src 'self' {asset_domain} data:;" "img-src 'self' {asset_domain} *.google-analytics.com *.notifications.service.gov.uk {logo_domain} data:;" - "frame-src 'self' www.youtube.com;".format( + "frame-src 'self' www.youtube-nocookie.com;".format( asset_domain=current_app.config['ASSET_DOMAIN'], logo_domain=get_logo_cdn_domain(), ) diff --git a/app/templates/views/signedout.html b/app/templates/views/signedout.html index 6ff7c97fa..ea9e7db75 100644 --- a/app/templates/views/signedout.html +++ b/app/templates/views/signedout.html @@ -110,7 +110,7 @@
diff --git a/tests/app/main/views/test_headers.py b/tests/app/main/views/test_headers.py index 9f5858240..be940833d 100644 --- a/tests/app/main/views/test_headers.py +++ b/tests/app/main/views/test_headers.py @@ -21,7 +21,7 @@ def test_owasp_useful_headers_set( "font-src 'self' static.example.com data:;" "img-src " "'self' static.example.com *.google-analytics.com *.notifications.service.gov.uk static-logos.test.com data:;" - "frame-src 'self' www.youtube.com;" + "frame-src 'self' www.youtube-nocookie.com;" ) @@ -43,5 +43,5 @@ def test_headers_non_ascii_characters_are_replaced( "font-src 'self' static.example.com data:;" "img-src " "'self' static.example.com *.google-analytics.com *.notifications.service.gov.uk static-logos??.test.com data:;" - "frame-src 'self' www.youtube.com;" + "frame-src 'self' www.youtube-nocookie.com;" )