Skip to content

Commit

Permalink
Merge pull request #1150 from DFE-Digital/bugfix/ga-script-source
Browse files Browse the repository at this point in the history
fix for ga script source
  • Loading branch information
paullocknimble authored Jul 16, 2024
2 parents c4b2d1b + b72d939 commit c747306
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,18 @@ public static HeaderPolicyCollection GetHeaderPolicyCollection(bool isDev)
{
builder.AddObjectSrc().None();
builder.AddBlockAllMixedContent();
builder.AddImgSrc().Self().From("data:").From(GoogleAnalyticsUri)
builder.AddImgSrc().Self()
.From("data:")
.From(GoogleAnalyticsUri)
.From(GoogleTagManagerUri);
builder.AddFormAction().Self();
builder.AddFormAction().OverHttps();
builder.AddFontSrc().Self();
builder.AddStyleSrc().Self();
builder.AddBaseUri().Self();
builder.AddScriptSrc().From(GoogleTagManagerUri).UnsafeInline().WithNonce();
builder.AddScriptSrc().From(ApplicationInsightsUri).UnsafeInline().WithNonce();
builder.AddScriptSrc()
.From(GoogleTagManagerUri)
.From(ApplicationInsightsUri).UnsafeInline().WithNonce();
builder.AddFrameAncestors().None();
})
.AddPermissionsPolicy(builder =>
Expand Down

0 comments on commit c747306

Please sign in to comment.