Update AbpSecurityHeadersMiddleware.cs

pull/16758/head
Salih 2 years ago
parent 8ffcb588ff
commit 1993226525

@ -35,15 +35,11 @@ public class AbpSecurityHeadersMiddleware : IMiddleware, ITransientDependency
x.Contains("text/html") || x.Contains("*/*") || x.Contains("application/xhtml+xml"));
var endpoint = context.GetEndpoint();
if (endpoint != null)
if (endpoint?.Metadata.GetMetadata<IgnoreAbpSecurityHeaderAttribute>() != null)
{
var ignore = endpoint.Metadata.GetMetadata<IgnoreAbpSecurityHeaderAttribute>() != null;
if (ignore)
{
await next.Invoke(context);
return;
}
await next.Invoke(context);
return;
}
if (!requestAcceptTypeHtml

Loading…
Cancel
Save