Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Corporate Proxy not supported during verification #1188

Closed
mefellows opened this issue Mar 13, 2024 Discussed in #1187 · 0 comments
Closed

Bug: Corporate Proxy not supported during verification #1188

mefellows opened this issue Mar 13, 2024 Discussed in #1187 · 0 comments
Labels
bug Indicates an unexpected problem or unintended behavior help wanted Indicates that a maintainer wants help on an issue or pull request

Comments

@mefellows
Copy link
Member

Discussed in #1187

Originally posted by zac-poe March 7, 2024
I am in the process of updating to the latest version of pact-js and I am encountering issues configuring a web proxy for use with the Verifier.

My approach with pact 9.17 (and pact-node 10.17) was to use global-agent to leverage our https proxy and this worked successfully when my providerBaseUrl for the pact Verifier would otherwise be blocked by our web proxy.

When updating to pact 12.3.0, I noticed several issues with the above approach. Initially I had to add NO_PROXY configuration for 127.0.0.1. Subsequently, I saw runtime issues with the pact parseBody.js behavior as the proxy request was already in a finished/headersSent state when this event hook was attempting to update the request. However, even after manually modifying this behavior I was observing the global agent proxy on https was still not actually being leveraged and my provider requests were not going through the web proxy.

Similary, setting environment variables for HTTPS_PROXY or HTTP_PROXY does not seem to impact the underlying pact internal proxy forwarding from local to the provider URL.

What is the proper way to configure use of a corporate proxy with the latest Pact Verifier? Is this a feature that would need to be requested as an enhancement (e.g. adding an optional arg for an http Agent to the Verifier)?

@mefellows mefellows added bug Indicates an unexpected problem or unintended behavior help wanted Indicates that a maintainer wants help on an issue or pull request labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior help wanted Indicates that a maintainer wants help on an issue or pull request
Projects
None yet
Development

No branches or pull requests

1 participant