Version: v2023-01-05 | Includes use: Yes |
---|
Behavior name: Set Response Code
Change the existing response code. For example, if your origin sends a 301
permanent redirect, this behavior can change it on the edge to a temporary 302
redirect.
Default behavior
These samples reflect the behavior's default settings. You can use these as is in your configurations or make adjustments based on the behavior's available options.
data "akamai_property_rules_builder" "response_code" {
rules_v2025_02_18 {
name = "Set Response Code"
comments = "Changes the existing response code."
behavior {
response_code {
status_code = 200
override206 = false
}
}
}
}
"behaviors": [
{
"name": "responseCode",
"options": {
"statusCode": 200,
"override206": false
}
}
]
Options
Option | Description |
---|---|
status_code |
The HTTP status code to replace the existing one. Value is one of:
|
override206 |
Allows any specified
200 success code to override a 206 partial-content code, in which case the response's content length matches the requested range length.
|