Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,9 @@ Deployed custom rulesets will only apply to incoming traffic of Enterprise domai

<Render
file="custom-response-blocked-requests"
params={{ one: "WAF block", two: "403", three: "2 KB" }}
params={{
responseType: "WAF block",
defaultStatusCode: "403",
maxBodySize: "2 KB",
}}
/>
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,9 @@ The **Deployed custom rate limiting rulesets** list will show a rule for each de

<Render
file="custom-response-blocked-requests"
params={{ one: "rate limiting", two: "429", three: "30 KB" }}
params={{
responseType: "rate limiting",
defaultStatusCode: "429",
maxBodySize: "30 KB",
}}
/>
6 changes: 5 additions & 1 deletion src/content/docs/waf/custom-rules/create-dashboard.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,9 @@ import { Render } from "~/components";

<Render
file="custom-response-blocked-requests"
params={{ one: "WAF block", two: "403", three: "2 KB" }}
params={{
responseType: "WAF block",
defaultStatusCode: "403",
maxBodySize: "2 KB",
}}
/>
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,9 @@ import { Render } from "~/components";

<Render
file="custom-response-blocked-requests"
params={{ one: "rate limiting", two: "429", three: "30 KB" }}
params={{
responseType: "rate limiting",
defaultStatusCode: "429",
maxBodySize: "30 KB",
}}
/>
13 changes: 7 additions & 6 deletions src/content/partials/waf/custom-response-blocked-requests.mdx
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
---
inputParameters: responseType;;defaultStatusCode;maxBodySize
params:
- responseType
- defaultStatusCode
- maxBodySize
---

import { Markdown } from "~/components";

When you select the _Block_ action in a rule you can optionally define a custom response.

The custom response has three settings:

- **With response type**: Choose a content type or the default {props.one} response from the list. The available custom response types are the following:
- **With response type**: Choose a content type or the default {props.responseType} response from the list. The available custom response types are the following:

| Dashboard value | API value |
| --------------- | -------------------- |
Expand All @@ -17,6 +18,6 @@ The custom response has three settings:
| Custom JSON | `"application/json"` |
| Custom XML | `"text/xml"` |

- **With response code**: Choose an HTTP status code for the response, in the range 400-499. The default response code is {props.two}.
- **With response code**: Choose an HTTP status code for the response, in the range 400-499. The default response code is {props.defaultStatusCode}.

- **Response body**: The body of the response. Configure a valid body according to the response type you selected. The maximum field size is {props.three}.
- **Response body**: The body of the response. Configure a valid body according to the response type you selected. The maximum field size is {props.maxBodySize}.
Loading