Skip to content

Commit

Permalink
Add X-Content-Type-Options header (#540)
Browse files Browse the repository at this point in the history
  • Loading branch information
ancaantochi committed Nov 19, 2018
1 parent 7fa87d6 commit df3d4e4
Showing 1 changed file with 7 additions and 0 deletions.
Expand Up @@ -78,6 +78,13 @@ public void Configure(IApplicationBuilder app)

app.UseAuthenticationMiddleware(iotHubHostname, edgeDeviceId);

app.Use(async (context, next) =>
{
// Response header is added to prevent MIME type sniffing
context.Response.Headers.Add("X-Content-Type-Options", "nosniff");
await next();
});

app.UseMvc();
}
}
Expand Down

0 comments on commit df3d4e4

Please sign in to comment.