Content Content Security Policy (CSP)
Implement a Content Security Policy (CSP) to protect your Umbraco site from XSS and data injection.
How to fix this health check
Adding a Content Security Policy (CSP) using NWebSec
...
WebApplication app = builder.Build();
app.UseCsp(options => options
.ImageSources(s => s
.Self()
.CustomSources(
"our.umbraco.com data:",
"dashboard.umbraco.com"))
.DefaultSources(s => s
.Self()
.CustomSources(
"our.umbraco.com",
"marketplace.umbraco.com"))
.ScriptSources(s => s
.Self())
.StyleSources(s => s
.Self())
.FontSources(s => s
.Self())
.ConnectSources(s => s
.Self())
.FrameSources(s => s
.Self()));Adding a Content Security Policy (CSP) using manual middleware
Last updated
Was this helpful?