Skip to content

Commit b69411c

Browse files
991761: Replace obsolete Class used in CSP
1 parent c6b6de8 commit b69411c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ej2-asp-core-mvc/common/EJ2_ASP.NETCORE/content-security-policy.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ publishingplatform: ##Platform_Name##
88
documentation: ug
99
---
1010

11-
# Content Security Policy
11+
# Content Security Policy in ASp.Net Core
1212

1313
Content Security Policy (CSP) is a security feature implemented by web browsers to protect against attacks such as cross-site scripting (XSS) and data injection. It limits the sources from which content can be loaded on a web page. To enable strict Content Security Policy (CSP), certain browser features are disabled by default. To use Syncfusion<sup style="font-size:70%">&reg;</sup> controls with strict CSP mode, it is essential to include the following directives:
1414

@@ -35,7 +35,7 @@ app.Use(async (context, next) =>
3535
context.Items.Add("ScriptNonce", nonceValue);
3636
context.Response.Headers.Add("Content-Security-Policy", string.Format(
3737
"script-src 'self' 'nonce-{0}' https://cdn.syncfusion.com;" +
38-
"style-src-elem 'self' 'unsafe-inline' https://cdn.syncfusion.com https://fonts.googleapis.com;" +
38+
"style-src-elem 'self' 'nonce-{0}' https://cdn.syncfusion.com https://fonts.googleapis.com;" +
3939
"font-src 'self' data: https://fonts.gstatic.com;" +
4040
"object-src 'none';", nonceValue));
4141
await next();

0 commit comments

Comments
 (0)