#Click-Jacking Protection and Content/MIME Sniffing Protection

1 messages · Page 1 of 1 (latest)

onyx zinc
#

I apply added the suggested codes below as Umbraco documentation to program.cs. But this does not help fixing security issues for Click-Jacking Protection & Content/MIME Sniffing Protection.
Do i miss something?

app.Use(async (context, next) =>
{
context.Response.Headers.Append("X-Frame-Options", "SAMEORIGIN");
await next();
});
app.Use(async (context, next) =>
{
context.Response.Headers.Append("X-Content-Type-Options", "nosniff");
await next();
});

next shell
#

Think you should combine?

app.Use(async (context, next) =>
{
    context.Response.Headers.Append("X-Frame-Options", "SAMEORIGIN");
  context.Response.Headers.Append("X-Content-Type-Options", "nosniff");
    await next();
});

you might want a few others too..
https://scotthelme.co.uk/hardening-your-http-response-headers/#x-frame-options
and run the site through https://securityheaders.com/

Scott Helme

Learn how to increase the security stance of your website by adding or removing some simple HTTP response headers.