Record immutable collection create, update, and delete activity in FrogBot.
The audit log plugin records who changed each document, what changed, and when. Audit entries are available in the audit-logs collection and cannot be created, updated, or deleted through the API.
By default, the plugin audits create, update, and delete operations for every configured collection. The plugin runs with order: 90, after plugins that add collections, so those collections are audited too wherever you list it.Each entry records the collection, operation, document ID, user, API key ID when available, timestamp, and a shallow changed-fields diff. Audit failures are logged without failing the original write.
Forwarded IP headers are ignored by default because clients can spoof them. If every request reaches FrogBot through a trusted proxy that replaces x-forwarded-for or x-real-ip, explicitly enable proxy trust:
trustProxy trusts the first x-forwarded-for value and falls back to x-real-ip. Do not enable it when clients can connect directly or when your proxy appends untrusted values instead of replacing the header. User-agent capture does not require proxy trust.Store full document snapshots for deletes or every operation:
auditLogPlugin({ snapshot: 'delete' })
The default snapshot mode is never.
Snapshots can store secrets, personal data, uploaded-content metadata, and other sensitive document fields. Enable them only after applying appropriate audit-log read access, retention, and data-handling controls.