Edge Functions
Running custom code during traffic processing
Last updated
Running custom code during traffic processing
Last updated
An Edge Function (EF) allow you to extend Reblaze's tools and functionality. An EF consists of Lua code that can be run at different points in Reblaze'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 Reblaze. Or, it can be run after Reblaze's traffic filtering has been completed.
Out of the box, Reblaze includes a number of Edge Functions. Initially, they are not assigned to any Backend Services.
When an admin creates an Edge Function, Reblaze validates the code with a Lua compiler. If any syntax errors are found, an error message will be shown. However, Reblaze 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 Reblaze attempts to execute it.
Edge Functions are a very powerful tool. If you need assistance with this feature, please feel free to contact support.
Edge Functions are assigned to destination paths/URLs within Security Policies.
The main window (shown above) lists all current Edge Functions.
The administration (addition/deletion/editing/versioning) of EFs follows the conventions described here.
A name for this EF, to be used within the Reblaze interface.
Information about this EF, for use within the interface.
This specifies when the Edge Function code will be executed.
Request: The EF will run as soon as Reblaze receives an incoming request, before any other processing occurs.
Response: The EF will run as the last action before Reblaze sends the response to the client.
The Lua code for the Edge Function.