Fortinet white logo
Fortinet white logo

Script Reference Guide

LB:routing("content_routing_profile_name")

LB:routing("content_routing_profile_name")

Allows you to programmatically assign traffic to a specific real server pool by referencing a predefined content routing profile. This provides a flexible way to manage Layer 7 TCP and UDP traffic steering through the scripting engine.

Script-based pool routing only functions when content routing is enabled on the virtual server; otherwise, the virtual server forwards traffic to its default real server pool.

Syntax

LB:routing("content_routing_profile_name")

Arguments

Name Description

content_routing_profile_name

Specifies the name of the content routing profile to be used for the connection.

Note:

The profile must be previously configured in the Layer 7 TCP/UDP Virtual Server; otherwise, the script returns an error.

Events

  • STREAM_CLIENT_INIT: Triggered when a client connection is first initialized.

  • STREAM_REQUEST_DATA: Triggered when the system receives data from the client stream.

Example

when STREAM_CLIENT_INIT{
    LB:routing("content routing profile")
}

Supported Version

FortiADC versions 8.0.3 or later.

LB:routing("content_routing_profile_name")

LB:routing("content_routing_profile_name")

Allows you to programmatically assign traffic to a specific real server pool by referencing a predefined content routing profile. This provides a flexible way to manage Layer 7 TCP and UDP traffic steering through the scripting engine.

Script-based pool routing only functions when content routing is enabled on the virtual server; otherwise, the virtual server forwards traffic to its default real server pool.

Syntax

LB:routing("content_routing_profile_name")

Arguments

Name Description

content_routing_profile_name

Specifies the name of the content routing profile to be used for the connection.

Note:

The profile must be previously configured in the Layer 7 TCP/UDP Virtual Server; otherwise, the script returns an error.

Events

  • STREAM_CLIENT_INIT: Triggered when a client connection is first initialized.

  • STREAM_REQUEST_DATA: Triggered when the system receives data from the client stream.

Example

when STREAM_CLIENT_INIT{
    LB:routing("content routing profile")
}

Supported Version

FortiADC versions 8.0.3 or later.