Deny
Overview
The Deny Traffic Policy action enables you to reject incoming requests on your endpoints before they make it to your upstream service.
Configuration Reference
This is the Traffic Policy configuration reference for this action.
Action Type
deny
Configuration Fields
Parameter | Type | Description |
---|---|---|
status_code | int | Response status code. Default is 999 . |
Behavior
When this action is executed, the upstream server is never reached and a response is immediately returned and no further actions or rules in the policy configuration will be executed.
Custom Content
The deny traffic policy action will not send back a response body to the client.
To send back a response body, use the custom-response
action.
Examples
Deny traffic with a 404 status code
The following Traffic Policy
configuration will deny all inbound traffic with a 404
on your endpoint.