Skip to main content
ngrok’s Traffic Policy is a configuration language that offers you the flexibility to filter, match, manage, and orchestrate traffic to your endpoints.
  • Validate incoming traffic, block malicious traffic, rewrite URLs, and respond with custom content.
  • Forward traffic to your agents running across the globe and orchestrate traffic across your infrastructure.
  • Scope traffic management for any kind of ngrok endpoint.

Concepts

Features

  • Actions - Transform, redirect, and manage traffic flow with actions like add-headers, rate-limit, and jwt-validation.
  • Variables - Predefined values representing things like the IP address associated with a request, the URL of the endpoint accepting the traffic, and more, which can be used to dynamically manage traffic.
  • Macros - Apply macros in rule conditions to refine traffic segmentation and configure actions with dynamic precision.

Use cases

What’s next?

  • Get started by applying a Traffic Policy to your app with the ngrok agent.
  • Learn the key concepts that make up a Traffic Policy and how it works.
  • Explore practical examples to see Traffic Policies in action.