Link11 WAAP
v5
v5
  • Link11 WAAP Documentation
  • Release Notes
  • Known Issues
  • User Guide
    • Introduction to Link11 WAAP
  • How Link11 WAAP Works
    • Traffic Filtering Process
    • Traffic Reporting and Analytics
    • Policy Mapping and Traffic Routing
    • Tagging
    • UI Overview and Common Elements
  • Console UI Walkthrough
    • Analytics
      • Dashboard
      • Events Log
    • Security
      • Global Filters
      • Flow Control Policies
      • Security Policies
      • Rate Limit Rules
      • ACL Profiles
      • Actions
      • Dynamic Rules
      • Quarantined
      • Content Filter
        • Content Filter Profiles
        • Content Filter Rules
    • Sites
      • Server Groups
      • Proxy Templates
      • Mobile Application Groups
      • Backend Services
      • Edge Functions
      • DNS Records
      • SSL
        • Load Balancers
        • Certificates
    • System
      • Interactive Challenge
      • SSO Configuration
      • Purge CDN Cache
      • Users Management
      • Security Alerts
      • Log Exporters
      • Version Control
      • System DB
      • Publish Changes
    • Account
  • Using the product
    • Best Practices
      • Saving and Publishing Your Changes
      • Enabling Passive Challenges
      • Understanding and Diagnosing Traffic Issues
    • How Do I...
      • Authenticate mobile app users
      • Ban, unban, and allowlist traffic sources
      • Bypass Link11 WAAP for loadtesting or other purposes
      • Configure a new path/section of a site
      • Control caching behavior
      • Customize responses to clients
      • Defer argument retrieval in the Events Log
      • Enable GraphQL traffic
      • Enable mTLS (mutual TLS)
      • Generate or renew my own SSL certificates
      • Protect sensitive information in logs and analytics
      • Quickly block an attacker
      • Redirect or block HTTP traffic
      • Run custom code
      • Set rate limits and exemptions
      • Stream event data to a SIEM solution or other destination
    • The Link11 WAAP API
      • Overview
      • Internal data structures
      • Using Swagger UI
      • Using curl
  • Reference Information
    • Acronyms
    • API
      • API access to traffic data
      • Types of namespaces
      • Namespace reference
        • ACL Profiles
        • Actions
        • Backend Services
        • Certificates
        • Configs
        • Content Filter Profiles
        • Content Filter Rules
        • Data queries
        • Dynamic Rules
        • Edge Functions
        • Flow Control Policies
        • Global Filters
        • Load Balancers
        • Log Exporters
        • Mobile Application Groups
        • Planets
        • Proxy Templates
        • Rate Limit Rules
        • Security Alerts
        • Security Policies
        • Server Groups
        • Tags
        • Tools
        • Users
    • Hostile Bot Detection / LWCSI
      • Environmental detection and browser verification
      • Client authentication
      • Biometric behavioral verification
    • HTTP Response Codes
    • Log Exporter Output
    • Pattern Matching Syntax
    • Query Filter Syntax and Best Practices
  • Support
Powered by GitBook
On this page
  • Overview
  • Usage within applications and APIs
  • Administration
  • Parameters
  • Name
  • Description
  • Phase
  • Code
  • Connections to Security Policies

Was this helpful?

Export as PDF
  1. Console UI Walkthrough
  2. Sites

Edge Functions

Running custom code during traffic processing

PreviousBackend ServicesNextDNS Records

Last updated 2 hours ago

Was this helpful?

Overview

An Edge Function (EF) allow you to extend Link11 WAAP's tools and functionality. An EF consists of Lua code that can be run at different points in L11WAAP's traffic processing.

An EF can be configured to execute before any other processing occurs. Therefore, it can override or preempt other configured settings within L11WAAP. Or, it can be run after traffic filtering has been completed.

When an admin creates an Edge Function, L11WAAP validates the code with a Lua compiler. If any syntax errors are found, an error message will be shown. However, Link11 does not validate the code beyond this. Please ensure that the code is valid and tested before adding it. If the code has errors, undefined behavior can occur when L11WAAP attempts to execute it.

Usage within applications and APIs

Administration

The main window (shown above) lists all current Edge Functions.

Parameters

Name

A name for this EF, to be used within the interface.

Description

Information about this EF, for use within the interface.

Phase

This specifies when the Edge Function code will be executed.

Phase
Description

Request Pre Processing

Executes immediately when L11WAAP receives an incoming request, before any other processing occurs.

  • Runs before the security logic.

  • Cannot be preempted/prevented by the security logic, since it executes beforehand.

  • A request might only be blocked here if NGINX itself blocks it (e.g., due to malformed headers or connection limits).

Request Post Processing

Executes after L11WAAP has finished processing the request, and before it sends the request to the backend server.

  • Runs after the security logic.

  • Will only be reached if the request is allowed by the security logic.

  • If the request is blocked, this stage will not be executed.

Response Pre Processing

Executes when L11WAAP receives the response from the backend.

  • Runs on the response coming back from the origin, before any potential processing.

  • The response cannot be blocked here, as L11WAAP does not evaluate or filter responses from the origin at this stage (unless NGINX does it for some reason).

Response Post Processing

Executes as the last action before L11WAAP sends the response to the client.

  • Runs after the response has been processed (e.g., the addition of the upstream-status tag) and just before it is sent to the client.

  • Similar to the previous stage, since there is no security logic evaluating responses, this function cannot be blocked and will execute as normal.

Code

The Lua code for the Edge Function.

Connections to Security Policies

The list of Security Policies that include this Edge Function. Each Security Policy defines the scope (i.e., the paths within Backend Services) for which the Function will be active.

Out of the box, L11WAAP includes a number of Edge Functions. Initially, they are not assigned to any .

Edge Functions are a very powerful tool. If you need assistance with this feature, please feel free to .

Edge Functions are assigned to destination paths/URLs within .

The administration (addition/deletion/editing/versioning) of EFs follows the conventions described .

For a discussion of how to use this control, see .

Backend Services
contact support
Security Policies
here
Connections to Security Policies