Getting Started with Agent Endpoints and Traffic Policy via CLI Flags
Prerequisites
- ngrok Account - Ensure you have an active ngrok account.
- ngrok Agent - Download and install the ngrok agent for your operating system.
Step 1: Create a Traffic Policy
Create a custom traffic policy file with the following contents:
Loading…
This policy will respond to each HTTP request with a simple “Hello, World!” message.
Step 2: Apply Your Traffic Policy
Run the agent, applying the traffic policy you saved in the previous step with the --traffic-policy-file
flag:
Loading…
This command starts an HTTP tunnel for port 80
, using the specified policy.yml
traffic policy to manage traffic.