/plushcap/analysis/ngrok/ngrok-post-http-traffic-request-variables

Deploy advanced HTTP traffic shaping with request variables and CEL

What's this blog post about?

ngrok's Traffic Policy module allows developers to shape HTTP traffic by using request variables, which provide access to details like headers, cookies, trailers, and target URLs. Request variables can be used in CEL expressions or interpolated into actions for custom responses, adding headers, and logging. The new library of request variables includes `req.content_type`, `req.method`, `req.user_agent`, `req.url.uri`, and others, organized under the `req` namespace. These variables enable developers to implement various use cases, such as blocking excessive file uploads, creating "pretty" URLs for better UX and SEO, deploying A/B tests, and providing custom error responses with Problem Details. To get started, sign up for a free ngrok account and explore resources on Traffic Policy and request variables.

Company
Ngrok

Date published
Sept. 12, 2024

Author(s)
Joel Hans

Word count
1784

Language
English

Hacker News points
None found.


By Matt Makai. 2021-2024.