Fortinet white logo
Fortinet white logo

Script Reference Guide

HTTP:header_insert(header_name, value)

HTTP:header_insert(header_name, value)

Inserts the header <header_name> with value <value> into the end of the HTTP request or response.

Syntax

HTTP:header_insert(header_name, value);

Arguments

Name Description

Header_name

A string which specifies the header name.

Value

A string which specifies the value of the header<header_name>.

Events

Applicable in the following events:

  • BEFORE_AUTH

  • HTTP_REQUEST

  • HTTP_RESPONSE

  • WAF_REQUEST_ATTACK_DETECTED

  • WAF_REQUEST_BEFORE_SCAN

  • WAF_RESPONSE_ATTACK_DETECTED

  • WAF_RESPONSE_BEFORE_SCAN

Example

when HTTP_REQUEST {
HTTP:header_insert(“Cookie”, “insert_cookie=server1”)
}

Supported Version

FortiADC version 4.3.x and later.

HTTP:header_insert(header_name, value)

HTTP:header_insert(header_name, value)

Inserts the header <header_name> with value <value> into the end of the HTTP request or response.

Syntax

HTTP:header_insert(header_name, value);

Arguments

Name Description

Header_name

A string which specifies the header name.

Value

A string which specifies the value of the header<header_name>.

Events

Applicable in the following events:

  • BEFORE_AUTH

  • HTTP_REQUEST

  • HTTP_RESPONSE

  • WAF_REQUEST_ATTACK_DETECTED

  • WAF_REQUEST_BEFORE_SCAN

  • WAF_RESPONSE_ATTACK_DETECTED

  • WAF_RESPONSE_BEFORE_SCAN

Example

when HTTP_REQUEST {
HTTP:header_insert(“Cookie”, “insert_cookie=server1”)
}

Supported Version

FortiADC version 4.3.x and later.