Skip to main content

Module transform

Module transform 

Source
Expand description

Request transformation logic.

Pure functions for transforming proxy requests according to the configured translation rules:

  • Header stripping (case-insensitive)
  • Header setting with {access_token} template resolution
  • Query parameter appending
  • Upstream URL construction

Functions§

build_upstream_url
Build the upstream URL from the base URL and request path/query.
resolve_set_headers
Resolve all configured set-headers, replacing {access_token} in values.
resolve_template
Resolve the {access_token} template variable in a header value.
should_strip_header
Check whether a header name should be stripped (case-insensitive).