Content/MIME Sniffing Protection
Protect your Umbraco site from MIME sniffing vulnerabilities using security headers like X-Content-Type-Options.
How to fix this health check
Adding Content/MIME Sniffing Protection using NWebSec
...
WebApplication app = builder.Build();
app.UseXContentTypeOptions();
...Adding Content/MIME Sniffing Protection using manual middleware
namespace MySite.Middleware;
public class NoSniffMiddleware : IMiddleware
{
public async Task InvokeAsync(HttpContext context, RequestDelegate next)
{
context.Response.Headers.Append("X-Content-Type-Options", "nosniff");
await next(context);
}
}PreviousContent Content Security Policy (CSP)NextCross-site scripting Protection (X-XSS-Protection header)
Last updated
Was this helpful?