Vercel WAF Management
Learn how to use the Vercel SDK through real-life examples.
Add custom rules
In this example, you create a new custom rule to protect your application against SQL injection threats.
run.ts
Modify existing rules
In this example, you update an existing custom rule’s configuration. This is useful When you need to programmatically adjust conditions, actions, or status of an existing rule.
run.ts
Delete custom rules
In this example, you delete an existing custom rule.
run.ts
Change rule priority
This parameter applies when you have more than one custom rule in your project. By default, the priority is determined based on the order in which the rules are added. You can change this in the Vercel dashboard by re-ordering the rules in the Firewall Configure project page or by using the endpoint below.
run.ts