Fortinet white logo
Fortinet white logo

Script Reference Guide

HTTP:header_replace(header_name, value)

HTTP:header_replace(header_name, value)

Replaces the occurrence value of header <header_name> with value <value>.

Syntax

HTTP:header_replace(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:

  • HTTP_REQUEST

  • HTTP_RESPONSE

Example

when HTTP_REQUEST {
HTTP:header_replace(“Host”, “www.fortinet.com”)
}

Supported Version

FortiADC version 4.8.x and later.

HTTP:header_replace(header_name, value)

HTTP:header_replace(header_name, value)

Replaces the occurrence value of header <header_name> with value <value>.

Syntax

HTTP:header_replace(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:

  • HTTP_REQUEST

  • HTTP_RESPONSE

Example

when HTTP_REQUEST {
HTTP:header_replace(“Host”, “www.fortinet.com”)
}

Supported Version

FortiADC version 4.8.x and later.