Skip to main content
Wrap an external API by injecting credentials from secrets. The client calls your function, and your function calls the real API with the correct keys. Pattern: route with parameters + authentication injection + response transformation.
index.ts

Local testing

Why it works this way

  • config.path: "/users/:id" — the :id is captured in ctx.params.id.
  • Credentials are never exposed to the client; they live in secrets.
  • cors.origin restricts which domains can call the proxy from the browser.
  • You can transform or filter the response before returning it.