response_​code

Version: v2023-01-05Includes 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:
  • 100
  • 101
  • 102
  • 103
  • 122
  • 200
  • 201
  • 202
  • 203
  • 204
  • 205
  • 206
  • 207
  • 226
  • 300
  • 301
  • 302
  • 303
  • 304
  • 305
  • 306
  • 307
  • 308
  • 400
  • 401
  • 402
  • 403
  • 404
  • 405
  • 406
  • 407
  • 408
  • 409
  • 410
  • 411
  • 412
  • 413
  • 414
  • 415
  • 416
  • 417
  • 422
  • 423
  • 424
  • 425
  • 426
  • 428
  • 429
  • 431
  • 444
  • 449
  • 450
  • 499
  • 500
  • 501
  • 502
  • 503
  • 504
  • 505
  • 506
  • 507
  • 509
  • 510
  • 511
  • 598
  • 599
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.