public void NoSniff_ContentTypeOptionsHeader_Has_Correct_Value() { var builder = new HeaderPolicyBuilder(); builder.AddContentTypeOptionsNoSniff(); var headerPolicy = builder.Build(); Assert.Single(headerPolicy.SetHeaders); Assert.Equal(ContentTypeOptionsHeader.NoSniff, headerPolicy.SetHeaders.Single().Value.Value); }
public static IApplicationBuilder UseCustomHeaders(this IApplicationBuilder app, HeaderPolicyBuilder builder) => app.UseMiddleware <HeaderMiddleware>(builder.Build());