Skip to content

Commit 6430d15

Browse files
authored
Merge pull request #45 from DuendeSoftware/mb/csp
Add CSP for fonts
2 parents 0508633 + 37d244b commit 6430d15

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

src/Duende.IdentityServer.Demo.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="Duende.IdentityServer" Version="7.4.3" />
11+
<PackageReference Include="Duende.IdentityServer" Version="7.4.6" />
1212
<PackageReference Include="Duende.AspNetCore.Authentication.JwtBearer" Version="0.3.0" />
1313
<PackageReference Include="Serilog.AspNetCore" Version="10.0.0" />
1414
</ItemGroup>

src/Pages/SecurityHeadersAttribute.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ public override void OnResultExecuting(ResultExecutingContext context)
3333
//csp += "upgrade-insecure-requests;";
3434
// also an example if you need client images to be displayed from twitter
3535
// csp += "img-src 'self' https://pbs.twimg.com;";
36+
37+
// Google Fonts
38+
csp += "font-src 'self' fonts.gstatic.com; style-src 'self' fonts.googleapis.com";
3639

3740
// once for standards compliant browsers
3841
if (!context.HttpContext.Response.Headers.ContainsKey("Content-Security-Policy"))

0 commit comments

Comments
 (0)