Fortinet white logo
Fortinet white logo

Script Reference Guide

HTTP:code_set(integer)

HTTP:code_set(integer)

Sets the response status code.

Syntax

HTTP:code_set(integer);

Arguments

Name Description

integer

Integer which specifies the status code.

Events

  • HTTP_RESPONSE

  • WAF_RESPONSE_ATTACK_DETECTED

  • WAF_RESPONSE_BEFORE_SCAN

Example

when HTTP_RESPONSE {
HTTP:code_set(503);
}

Supported Version

FortiADC version 4.8.x and later.

HTTP:code_set(integer)

HTTP:code_set(integer)

Sets the response status code.

Syntax

HTTP:code_set(integer);

Arguments

Name Description

integer

Integer which specifies the status code.

Events

  • HTTP_RESPONSE

  • WAF_RESPONSE_ATTACK_DETECTED

  • WAF_RESPONSE_BEFORE_SCAN

Example

when HTTP_RESPONSE {
HTTP:code_set(503);
}

Supported Version

FortiADC version 4.8.x and later.