abpframework / abp

Open-source web application framework for ASP.NET Core! Offers an opinionated architecture to build enterprise software solutions with best practices on top of the .NET. Provides the fundamental infrastructure, cross-cutting-concern implementations, startup templates, application modules, UI themes, tooling and documentation.
https://abp.io
GNU Lesser General Public License v3.0
12.78k stars 3.41k forks source link

Does the HEAD method access need to be recorded by audit log? #4010

Closed gdlcf88 closed 1 year ago

gdlcf88 commented 4 years ago

ABP sets IsEnabledForGetRequests=false by default to disable audit log for GET method.

The HEAD method is very similar to the GET method, and it is often used by heartbeat detectors. Maybe it does not have to be recorded.

hikalkan commented 4 years ago

Good suggestion, while HEAD method is not so frequently used. To be more flexible, we can create a service that has a ShouldCreateAuditLog() method that returns true/false. In this way, you can override the service and do whatever you want.

wjkhappy14 commented 4 years ago

Good suggestion

hikalkan commented 1 year ago

I think we can disable logging for HEAD if IsEnabledForGetRequests is false. No need to define another option. @maliming can we implement this?