Fortinet white logo
Fortinet white logo

Script Reference Guide

HTTP:header_exists(header_name)

HTTP:header_exists(header_name)

Returns true when the header <header_name> exists and false when it does not exist.

Syntax

HTTP:header_exists(header_name);

Arguments

Name Description

Header_name

A string which specifies the header name.

Events

Applicable in the following events:

  • HTTP_REQUEST

  • HTTP_RESPONSE

Example

when HTTP_REQUEST {
if HTTP:header_exists(“Cookie”) then
…
end
}

Supported Version

FortiADC version 4.3.x and later.

HTTP:header_exists(header_name)

HTTP:header_exists(header_name)

Returns true when the header <header_name> exists and false when it does not exist.

Syntax

HTTP:header_exists(header_name);

Arguments

Name Description

Header_name

A string which specifies the header name.

Events

Applicable in the following events:

  • HTTP_REQUEST

  • HTTP_RESPONSE

Example

when HTTP_REQUEST {
if HTTP:header_exists(“Cookie”) then
…
end
}

Supported Version

FortiADC version 4.3.x and later.