close-connection
Drops the client connection without sending any response.
| Phases | on_tcp_connecton_http_request |
| Terminating | Yes — once it answers, nothing after it runs. |
| Cost | Free |
Example
policy.yaml
on_http_request:
- name: DropScanners
expressions:
- "req.url.path.endsWith('.php')"
actions:
- type: close-connection
Start an agent endpoint with it: devgate http 8080 --traffic-policy-file policy.yaml, or paste it into a
reserved or cloud endpoint’s Traffic Policy tab in the dashboard.
Behaviour
- The traffic log records the request with no status.
Other actions
add-headers remove-headers compress-response basic-auth oauth openid-connect jwt-validation custom-response deny redirect url-rewrite restrict-ips rate-limit circuit-breaker verify-webhook http-request set-vars log forward-internal