Many updates
This commit is contained in:
@@ -38,7 +38,7 @@ export default class extends Controller {
|
||||
this.hideOptionalFields()
|
||||
|
||||
// Show relevant fields based on rule type
|
||||
if (["path_pattern", "header_pattern", "query_pattern", "body_signature"].includes(ruleType)) {
|
||||
if (["path_pattern"].includes(ruleType)) {
|
||||
if (this.hasPatternFieldsTarget) {
|
||||
this.patternFieldsTarget.classList.remove("hidden")
|
||||
this.updatePatternHelpText(ruleType)
|
||||
@@ -64,18 +64,6 @@ export default class extends Controller {
|
||||
path_pattern: {
|
||||
text: "Regex pattern to match URL paths (e.g.,\\.env$|wp-admin|phpmyadmin)",
|
||||
placeholder: "Example: \\.env$|\\.git|config\\.php|wp-admin"
|
||||
},
|
||||
header_pattern: {
|
||||
text: 'JSON with header_name and pattern (e.g., {"header_name": "User-Agent", "pattern": "bot.*"})',
|
||||
placeholder: 'Example: {"header_name": "User-Agent", "pattern": ".*[Bb]ot.*"}'
|
||||
},
|
||||
query_pattern: {
|
||||
text: "Regex pattern to match query parameters (e.g., union.*select|<script>)",
|
||||
placeholder: "Example: (?:union|select|insert|update|delete).*\\s+(?:union|select)"
|
||||
},
|
||||
body_signature: {
|
||||
text: "Regex pattern to match request body content (e.g., OR 1=1|<script>)",
|
||||
placeholder: "Example: (?:OR\\s+1\\s*=\\s*1|AND\\s+1\\s*=\\s*1|UNION\\s+SELECT)"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user