Method ForFingerprint
- Namespace
- QueryGuard
- Assembly
- QueryGuard.Core.dll
ForFingerprint(string, string)
Allows a specific fingerprint.
public static QueryGuardAllowlistEntry ForFingerprint(string fingerprintId, string reason)
Parameters
fingerprintIdstringThe fingerprint identifier, for example
QG-FP-1A2B3C4D.reasonstringWhy the repetition is intentional.
Returns
- QueryGuardAllowlistEntry
The entry.
Remarks
Matching by fingerprint is precise and brittle in a useful way: if the query changes, its fingerprint changes and the entry stops matching, so the exception has to be justified again. That is better than an entry that silently keeps suppressing a query nobody recognizes.
Exceptions
- ArgumentException
The identifier or the reason is empty or whitespace.