4.3 Query String Filtering
Last updated
Last updated
The Query String Filtering module enables you to control and sanitize the query parameters (GET variables) attached to incoming requests.
By defining allowed or blocked query strings on a per-path basis, you can protect sensitive endpoints, APIs, and web forms against tampering, injection, or unexpected behavior.
This adds a powerful application-layer control that complements WAF rules and general request validations.
Allow only expected parameters on specific pages.
Block unexpected or malicious parameters.
Remove untrusted query parameters automatically.
Harden API endpoints, authentication flows, and payment pages.
You define rules specifying:
Target Page Path:
(e.g., /login
, /api/user/info
, /checkout
)
Allowed Query Keys:
(e.g., email
, token
, id
)
When a request is made:
Only the listed keys are allowed.
Any additional parameters are either removed or blocked based on configuration.
Allowed Keys for /login
email
redirect_uri
Incoming Request:
Behavior:
admin=true
is removed or causes a block, depending on rule setting.
Allow Only These Keys: Block or strip any parameter not explicitly listed.
Action Mode:
Remove unauthorized arguments silently
Block the request if unauthorized arguments are detected
Multiple Rules: Create multiple rules for different paths.
Protect login and signup endpoints
Prevent parameter injection
Secure API requests
Enforce strict parameter structure
Harden payment callbacks
Only allow signed, expected arguments
Reduce attack surface
Disallow noisy or unnecessary parameters
Whitelist only absolutely necessary parameters.
Avoid allowing βdebugβ, βtestβ, or unused parameters on production systems.
Combine Query String Filtering with WAF to maximize protection.
Review URL patterns regularly as your application evolves.
Go to Security Rules > Query String Filtering.
Click Add New Rule.
Enter the Page Path.
Define all allowed query keys.
Choose the action (Remove unauthorized / Block unauthorized).
Save the rule.
π‘οΈ The rule will be active immediately for all matching requests.
Query filtering happens before request routing to backend servers.
Filtering is case-sensitive for parameter names.
Be cautious on dynamic URLs where parameters may vary unexpectedly.
π― By enforcing strict query string structures, you prevent misuse, abuse, and accidental exposure of your application's internal logic.