Browse Source

Update AbpSecurityHeadersMiddleware.cs

pull/16758/head
Salih 3 years ago
parent
commit
1993226525
  1. 10
      framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Security/AbpSecurityHeadersMiddleware.cs

10
framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Security/AbpSecurityHeadersMiddleware.cs

@ -36,14 +36,10 @@ public class AbpSecurityHeadersMiddleware : IMiddleware, ITransientDependency
var endpoint = context.GetEndpoint(); var endpoint = context.GetEndpoint();
if (endpoint != null) if (endpoint?.Metadata.GetMetadata<IgnoreAbpSecurityHeaderAttribute>() != null)
{ {
var ignore = endpoint.Metadata.GetMetadata<IgnoreAbpSecurityHeaderAttribute>() != null; await next.Invoke(context);
if (ignore) return;
{
await next.Invoke(context);
return;
}
} }
if (!requestAcceptTypeHtml if (!requestAcceptTypeHtml

Loading…
Cancel
Save