Skip to content

Support for custom response bodies / labels #90

@msoszka

Description

@msoszka

During creating ruleset / rules there is currently no option to specify Custom response body per Rulegroup or per rule. Also there is no option to specify labels for rules, so there is no easy way to reference to labels from another rules.
Would it be possible to implement managing that by i.e options in config:

waf_config:

  • web_acl_name: mywebacl
    fallback_action: ban
    rule_group_name: crowdsec-rule-group-XXX
    scope: REGIONAL
    region: eu-west-1
    ipset_prefix: crowdsec-ipset-
    rule_labels: mylabel
    ruleset_labels: otherlabel
    custom_body_json_file: /etc/crowdsec/custom.json

Where custom.json have proper structure for AWS WAF i.e:

{
  "AccessDeniedHtml": {
    "ContentType": "TEXT_HTML",
    "Content": <div>You are blocked, contact us at aaa@example.com </div>
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions