Web ๅบ”็”จ้˜ฒ็ซๅข™่ง„ๅˆ™ๆ”ฏๆŒ vercel.json ้…็ฝฎ

Source: Vercel News

You can now control Vercelโ€™s Web Application Firewall (WAF) actions directly in vercel.json, alongside existing support in the dashboard, API, and terraform.

This approach provides a structured way for both developers and agents to declaratively define and push rules to projects. Agents can use code-generating prompts to author new rules that are easily injected into the projectโ€™s vercel.json.

The has and missing matchers have also been enhanced to support more expressive conditions across headers, rewrites, redirects, and routes. Matching options include:

  • String equality and inequality

  • Regular expressions

  • Prefixes and suffixes

  • Inclusion and exclusion from string arrays

  • Numeric comparisons

The following example shows how to deny a request that is prefixed by a specific header:

Read more about Vercel's WAF and configuring WAF rules in vercel.json.

Read more