Skip to content

Edge function injection overview

Netlify Edge Functions connect the Netlify platform and workflow with an open runtime standard at the network edge. Your extension can inject edge functions into sites during the build step to provide fast, personalized web experiences.

With Netlify Edge Functions, your extension can modify network requests to provide custom functionality such as:

  • Localizing content.
  • Applying bot and fraud protection.
  • Optimizing a site using partial caching or optimizing for search engine crawlers.
  • Supporting dynamic nonces for a Content Security Policy (CSP).
  • Integrating existing corporate authentication and authorization to gate access to sensitive endpoints.
  • Acting as a form of reverse proxy to contextually unify multiple backend sites. For example, present myexamplesite.com as a dynamic and selective composition of legacy1.mysite.com, legacy2.mysite.com, and latest.mysite.com.

For more ideas, you can browse a full library of reference examples for different ways to use Edge Functions.

Once you publish your extension, it will be available for Netlify users to install on their teams. Please note there are usage and billing implications for your extension users when you inject edge functions.

Usage and billing

It’s important to note that Netlify Edge Functions have billing implications for your extension users based on usage, across all plans. We recommend that you review the usage and billing documentation and that you highlight the use of Edge Functions in your extension’s user documentation.

Note that it’s the extension users that incur any costs for Edge Functions service usage, not extension authors.

Documentation

  • Get started: how to install the Netlify SDK, generate the boilerplate files, and add code to create and inject an edge function.
  • Debug & test: how to test your extension with edge function injection locally, and configure VS Code for edge function support.

Got it!

Your feedback helps us improve our docs.