{
"type": "object",
"title": "Regex Detect Configuration",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"patterns"
],
"properties": {
"patterns": {
"type": "array",
"items": {
"type": "object",
"required": [
"regex"
],
"properties": {
"flags": {
"type": "string",
"title": "Regex Flags",
"default": "g",
"description": "Optional regex flags (e.g., 'gi' for global case-insensitive)"
},
"regex": {
"type": "string",
"title": "Regular Expression",
"description": "The regex pattern to match (e.g., \\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Z|a-z]{2,}\\b for emails)"
},
"rejectMessage": {
"type": "string",
"title": "Custom Reject Message",
"description": "Custom message to return when this pattern is matched"
}
}
},
"title": "Regex Patterns",
"minItems": 1,
"description": "List of regex patterns to scan for"
},
"redactMatches": {
"type": "boolean",
"title": "Redact Matches",
"default": false,
"description": "If true, redacts matched patterns instead of rejecting the request"
},
"redactionText": {
"type": "string",
"title": "Redaction Text",
"default": "[REDACTED]",
"description": "Text to replace redacted patterns with"
},
"scanAllMessages": {
"type": "boolean",
"title": "Scan All Messages",
"default": false,
"description": "If true, scans all messages. If false, only scans the latest message"
},
"redactCharacters": {
"type": "string",
"title": "Redact Characters",
"description": "If set, replaces each match with this character repeated to match the original length. Overrides redactionText"
}
},
"description": "Configuration for the Regex Detect plugin"
}