Close Connection
Overview
The Close Connection action lets you forcibly close connections to an endpoint when certain conditions are met—for example, when the number of requests exceeds a given limit (to mitigate DDoS attacks). This action can be used with other actions such as rate-limit and deny.
Configuration Reference
The Traffic Policy configuration reference for this action.
Supported Phases
on_http_request
, on_tcp_connect
Type
close-connection
Configuration Fields
This action does not have any configuration fields.
Behavior
When this action is executed, connection to the endpoint is closed immediately. This can be useful for dealing with DDoS attacks.
Examples
Basic Example
This example configuration sets up an endpoint (hotdog.ngrok.app
) and closes connection to the endpoint.
Example Traffic Policy Document
Loading…
Start Endpoint with Traffic Policy
Loading…
Helper script
Loading…
Action Result Variables
The following variables are made available for use in subsequent expressions and CEL interpolations after the action has run. Variable values will only apply to the last action execution, results are not concatenated.
This action does not set any variables after it has been executed.