Browse Source
Skip write audit logs if `auditLogInfo.HttpMethod` is `GET/Head`.
While `IsEnabledForGetRequests` is `false`.
pull/21463/head
maliming
2 years ago
No known key found for this signature in database
GPG Key ID: A646B9CB645ECEA4
1 changed files with
3 additions and
1 deletions
-
framework/src/Volo.Abp.Auditing/Volo/Abp/Auditing/AuditingInterceptor.cs
|
|
|
@ -191,7 +191,9 @@ public class AuditingInterceptor : AbpInterceptor, ITransientDependency |
|
|
|
} |
|
|
|
|
|
|
|
if (!options.IsEnabledForGetRequests && |
|
|
|
invocation.Method.Name.StartsWith("Get", StringComparison.OrdinalIgnoreCase)) |
|
|
|
(string.Equals(auditLogInfo.HttpMethod, "Get", StringComparison.OrdinalIgnoreCase) || |
|
|
|
string.Equals(auditLogInfo.HttpMethod, "Head", StringComparison.OrdinalIgnoreCase) || |
|
|
|
invocation.Method.Name.StartsWith("Get", StringComparison.OrdinalIgnoreCase))) |
|
|
|
{ |
|
|
|
return false; |
|
|
|
} |
|
|
|
|