Company
Date Published
Author
Joel Hans
Word count
872
Language
English
Hacker News points
None

Summary

The ngrok platform allows developers to create custom error pages with their logo and messages. This is achieved by setting up a Cloud Endpoint and an internal Agent Endpoint, using the `forward-internal` and `custom-response` Traffic Policy actions. The `forward-internal` action forwards traffic from the cloud endpoint to the internal agent endpoint, while the `custom-response` action sends out a custom error page if either the agent or upstream service is offline. This setup provides a consistent user experience and allows developers to customize the content of the error page with CSS and CEL interpolation. Additionally, this solution enables features such as chaining log actions, simplifying infrastructure, and adding composability to API gateways.