You can customize the response actions configuration to control the content that attackers or users receive when a security policy is triggered and intercepted. This is typically used in the following scenarios:
- Add your own brand or other personalized information to the request response to optimize user experience.
- Add system variables provided by Cloud Security 2.0 in the request response, so that users can quickly obtain necessary information to assist in troubleshooting when they report false positives.
- Set up deceptive response content for certain policies to fool attackers and increase their attack costs.
To configure a Custom Response Page:
- Log in to the CDNetworks Console, find the security product in use under Subscribed Products.
- Go to Security Settings > Shared Configuration > Actions.
- Scroll down the page to Custom Actions.
Create a Custom Action
- On the Custom Actions tab. Click Add.
- In Action Name, enter a name for the action.
- If you want, enter a Description.
- In Status Code, select the status code to respond to the user.
- Enter the Content-Type.
- In Response Content Definition, the size of the response content cannot exceed 16KB. If you need to insert static resources such as picture, it is recommended to use links to import. The following interception parameters are supported:
- {url}: Display the URL of the blocked request
- {client_ip}: Display the client IP.
- {time}: Display the time when the request was blocked.
- {event_id}: Display the ID of this event.
- {request_id}: Display the id of the intercepted request.
- Click Confirm to save.
Specify the Created Action for Security Policies
The current security policies that support specifying custom response actions are Workflow Detection and Rate Limiting. You can follow the steps below to specify an action you have created for these policies.
- Log in to the Console, find the security product in use under Subscribed Products.
- Go to Security Settings > Policies.
- Find the hostname for security policy configuration, and click Edit policies. Then, enter the Policy Editing page and find the policy for which you need to configure the custom response action.
- Specify the action of the corresponding policy as the name of the custom response action you created.