Hi All,
I want implement Content security Policy in ASP.NET CORE 3.0
Below code i am using but not succeeded
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
app.Use(async (context, next) => {
context.Response.Headers.Add("Content-Security-Policy","default-src 'none'; script-src 'self'; connect-src 'self'; img-src 'self'; style-src 'self'");
}
}
If anyone implemented in Projects pls Post here
This URL I used for Reference
https://cheatsheetseries.owasp.org/cheatsheets/Content_Security_Policy_Cheat_Sheet.html
Thank you