Actions
Traffic Policy actions enable you to modify the behavior of traffic flowing through your endpoints. The following actions are available for use on your endpoints:
Type | Description | Supported Phases |
---|---|---|
add-headers | Add custom headers to incoming requests or outgoing responses. | on_http_request, on_http_response |
compress-response | Compress HTTP response bodies from your upstream server. | on_http_request, on_http_response |
custom-response | Send a predefined custom response directly to the client. | on_http_request, on_http_response |
deny | Block incoming traffic to an endpoint. | on_http_request, on_tcp_connect |
forward-internal | Forward traffic to an endpoint within the same ngrok account. | on_http_request, on_tcp_connect |
jwt-validation | Validate JSON Web Tokens (JWT). | on_http_request |
log | Add metadata to events for logging and monitoring. | on_http_request, on_http_response, on_tcp_connect |
rate-limit | Rate limit traffic to your upstream servers. | on_http_request |
redirect | Redirect users through URL transformations using regular expressions. | on_http_request |
remove-headers | Remove headers from incoming requests or outgoing responses. | on_http_request, on_http_response |
restrict-ips | Allow or deny traffic based on source IP. | on_http_request, on_tcp_connect |
url-rewrite | Rewrite request URLs transparently using regular expressions. | on_http_request |
verify-webhook | Ensures webhook requests sent to your endpoints are intended for you. | on_http_request |