Proxy & Interceptor Rules
The Smart Relay Proxy allows you to rewrite requests and responses dynamically using rule-based interception. Perfect for mocking, debugging, and header injection.
The Interception Lifecycle
Pattern Match
The relay engine compares incoming URLs against your defined regex or wildcard patterns (e.g., /api/v1/*).
Rule Execution
If a match is found, specific InterceptorRules like Header Injection or URL Rewriting are applied instantly.
Final Forward
The transformed request is sent to the target server, and the response flows back through the same audit log.
Interceptor Capabilities
RULE_TYPE: ADD_HEADER
MATCH_URL: "https://external-service.com/*"
PAYLOAD: { "x-api-key": "{{PROD_KEY}}" }
RULE_TYPE: URL_REWRITE
FROM: "https://api.myapp.com/auth/*"
TO: "http://localhost:4000/*"
Latency Simulation
Simulate slow networks or high-concurrency environments by injecting artificial delay (e.g., 500ms) into targeted proxy routes.
Error Injection
Inject custom HTTP status codes (e.g., 401 Unauthorized or 429 Too Many Requests) to test your application's error handling and resiliency.
Deep Audit Logs
Every transformation is logged with "Before" and "After" state capture. Review exactly how your rules impacted a request's journey.