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.
  • Add Traffic Policies to any type of ngrok endpoint to scope traffic management for each of your endpoints.

Concepts

Features

  • Actions - Transform, redirect, and manage traffic flow with actions like add-headers, rate-limit, and jwt-validation.
  • Variables - Filter, segment, and dynamically configure traffic rules and actions based on specific conditions.
  • 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.