Firewall rules
Block bad traffic before it reaches the app: attack patterns, countries, addresses or paths you choose.
In stackly.json and the CLI it is firewall. It has no price of its own; see What features cost.
firewall · optional · no code · Stackly firewall in front of the app, WAF-style rules
Blocks bad traffic before it reaches the app: attack patterns, countries, addresses or paths.
Turn it on
"features": ["firewall"],
"firewall": {
"attackSignatures": true,
"blockCountries": [],
"allowCountries": [],
"blockIps": ["203.0.113.0/24"],
"blockPaths": ["/admin/*"]
}
Every field is optional. It needs no backend.
Use it
attackSignaturesblocks common SQL injection, script injection, path traversal and Log4Shell patterns.- Countries are two-letter codes.
allowCountriesblocks every other country. - Addresses take IPv4 or IPv6, with or without a CIDR range. Paths take
*as a wildcard. - Blocked requests get a 403 with
x-stackly-firewall: blocked.
Scanner paths such as /.env, /.git/ and /wp-admin are blocked for every app without this feature.
In Stackly
Rules change when the owner publishes.
Locally
stackly dev applies the same rules, so a blocked path or pattern can be tried. Country rules need the visitor's
country, which only Cloudflare knows, so they act on live.