|
|
@ -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 |
|
|
|