Fortinet white logo
Fortinet white logo
8.0.3

Scripting

Scripting

When native options fall short, FortiADC supports Lua-based HTTP scripting to extend traffic processing beyond the built-in feature set. The Scripting module allows administrators to attach event-driven scripts to Layer 2/Layer 7 HTTP/HTTPS virtual servers, enabling custom logic for specialized use cases.

It's recommended to use Scripting when FortiADC native options can't fulfill your requirements, for example:

  • Traffic Manipulation: The header, URL, cookie, or body transformations require logic not supported by Content Rewriting (e.g., conditional multi-field dependencies, dynamic value generation).

  • Dynamic Routing: Pool selection depends on complex, multi-condition logic beyond URI/header/IP matching (e.g., time-based routing, custom load algorithms).

  • Redirection Control: Redirects require runtime evaluation of response content, session state, or external data sources.

  • Authentication Integration: Implementing custom auth flows, token handling, or multi-step verification not covered by native Authentication policies.

  • Optimization: Building stateful features like custom rate limiting, queue management, or dynamic caching that require shared memory constructs (atomic counters, shared tables).

  • Protocol Handling: Handling edge-case protocol behaviors, legacy application quirks, or custom SSL/TCP parameter tuning not exposed in GUI/CLI.

For more information, see in FortiADC Script Reference Guide.

Scripting

Scripting

When native options fall short, FortiADC supports Lua-based HTTP scripting to extend traffic processing beyond the built-in feature set. The Scripting module allows administrators to attach event-driven scripts to Layer 2/Layer 7 HTTP/HTTPS virtual servers, enabling custom logic for specialized use cases.

It's recommended to use Scripting when FortiADC native options can't fulfill your requirements, for example:

  • Traffic Manipulation: The header, URL, cookie, or body transformations require logic not supported by Content Rewriting (e.g., conditional multi-field dependencies, dynamic value generation).

  • Dynamic Routing: Pool selection depends on complex, multi-condition logic beyond URI/header/IP matching (e.g., time-based routing, custom load algorithms).

  • Redirection Control: Redirects require runtime evaluation of response content, session state, or external data sources.

  • Authentication Integration: Implementing custom auth flows, token handling, or multi-step verification not covered by native Authentication policies.

  • Optimization: Building stateful features like custom rate limiting, queue management, or dynamic caching that require shared memory constructs (atomic counters, shared tables).

  • Protocol Handling: Handling edge-case protocol behaviors, legacy application quirks, or custom SSL/TCP parameter tuning not exposed in GUI/CLI.

For more information, see in FortiADC Script Reference Guide.