Skip to content

Commit

Permalink
Merge pull request #12099 from bbc/adjust-csp
Browse files Browse the repository at this point in the history
add teads + googleadservices to csp
  • Loading branch information
karinathomasbbc authored Oct 28, 2024
2 parents ba6b5b0 + 9b3d2cd commit da613bb
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 0 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 2 additions & 0 deletions src/server/utilities/cspHeader/directives.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const advertisingDirectives = {
'https://*.imrworldwide.com',
'https://sb.scorecardresearch.com',
'https://*.amazon-adsystem.com',
'https://www.googleadservices.com',
],
scriptSrc: [
'https://*.adsafeprotected.com',
Expand All @@ -37,6 +38,7 @@ const advertisingDirectives = {
'https://*.permutive.com',
'https://*.webcontentassessor.com',
'https://*.amazon-adsystem.com',
'https://*.teads.tv',
...advertisingServiceCountryDomains,
],
defaultSrc: [...bbcDomains, 'https://*.googlesyndication.com'],
Expand Down
6 changes: 6 additions & 0 deletions src/server/utilities/cspHeader/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ describe('cspHeader', () => {
'https://sb.scorecardresearch.com',
'https://i.ytimg.com',
'https://*.amazon-adsystem.com',
'https://www.googleadservices.com',
"data: 'self'",
].sort(),
scriptSrcExpectation: [
Expand Down Expand Up @@ -171,6 +172,7 @@ describe('cspHeader', () => {
'https://*.tiktokcdn.com',
'https://*.xx.fbcdn.net',
'https://*.amazon-adsystem.com',
'https://www.googleadservices.com',
"data: 'self'",
].sort(),
scriptSrcExpectation: [
Expand Down Expand Up @@ -202,6 +204,7 @@ describe('cspHeader', () => {
'https://connect.facebook.net',
'https://*.xx.fbcdn.net',
'https://*.amazon-adsystem.com',
'https://*.teads.tv',
...advertisingServiceCountryDomains,
"'self'",
"'unsafe-inline'",
Expand Down Expand Up @@ -271,6 +274,7 @@ describe('cspHeader', () => {
'https://*.facebook.com',
'https://*.xx.fbcdn.net',
'https://*.amazon-adsystem.com',
'https://www.googleadservices.com',
"data: 'self'",
].sort(),
scriptSrcExpectation: [
Expand Down Expand Up @@ -348,6 +352,7 @@ describe('cspHeader', () => {
'https://*.tiktokcdn.com',
'https://*.xx.fbcdn.net',
'https://*.amazon-adsystem.com',
'https://www.googleadservices.com',
"data: 'self'",
].sort(),
scriptSrcExpectation: [
Expand Down Expand Up @@ -381,6 +386,7 @@ describe('cspHeader', () => {
'https://*.xx.fbcdn.net',
'https://*.webcontentassessor.com',
'https://*.amazon-adsystem.com',
'https://*.teads.tv',
...advertisingServiceCountryDomains,
"'self'",
"'unsafe-inline'",
Expand Down

0 comments on commit da613bb

Please sign in to comment.