Implement the 'front door' pattern
TK
How to use this example
1. Create an internal Agent Endpoint
Start an ngrok agent, replacing $PORT
based on where you service listens.
Loading…
2. Reserve a domain
Navigate to the Domains section of
the ngrok dashboard and click New + to reserve a domain like
https://your-api.ngrok.app
.
3. Create a Cloud Endpoint
Navigate to the Endpoints
section of
the ngrok dashboard, then click New + and Cloud Endpoint to create a new
cloud endpoint with the URL https://your-api.ngrok.app
.
4. Apply Traffic Policy rule to your Cloud Endpoint
Copy and paste the YAML into the ngrok dashboard.
Loading…
What's happening here?
On every HTTP request, the Traffic Policy engine forwards the traffic to the
internal agent endpoint you created at https://service.internal
.
5. Try out your endpoint!
- In your browser: https://your-api.ngrok.app
- In your terminal:
curl https://your-api-ngrok.app
What's next?
TK