Closed jportner closed 1 year ago
Latest commit: 5d7701d49acdcf17da514df31921d83e173daf45
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Updated (UTC) |
---|---|---|---|
proxy-agents | ✅ Ready (Inspect) | Visit Preview | May 17, 2023 3:51pm |
Currently, the
headers
option can only be passed in when the HttpsProxyAgent is first created, so consumers can only set headers statically.Typically, proxy headers are used to trace requests as they pass through multiple systems to enable log correlation. If someone wants to reuse a single HttpsProxyAgent for multiple requests, this isn't ideal.
This PR updates the
headers
option so that it can also be a function that returns an object, allowing consumers to set the proxy headers dynamically.Companion PR to update HttpProxyAgent: #175