-
Notifications
You must be signed in to change notification settings - Fork 274
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
WP-1185 fix SDK using proxy #4169
Conversation
New dependencies detected. Learn more about Socket for GitHub ↗︎
|
examples/ts/proxy/server.ts
Outdated
// This *must* match the environment you are using in the create-wallet script | ||
const bitgoApi = 'https://app.bitgo-test.com'; | ||
// TODO: replace with your access token | ||
const secretAccessToken = 'yourAccessToken'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we changing this example? The goal of this example is to show an example of the server injecting the access token opposed to needing it in the frontend.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have roll-back the changes to this example and added another example for http proxy usage.
Got confused because of the name. The use case are actually different.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes lgtm, but I think the examples for create-wallet/server should stay the same. Feel free to sync with @alebusse to see why its having issues (we have clients using similar setups so we should ensure it still works)
We removed the superagent-proxy earlier to use proxy-agent. The change missed some old usage. Change the proxy-agent version to 5.0. This is the version that was used under the hood. The new version requires setting proxy url in the environment variable. It does not quite fit how we use the proxy-agent currently. Ticket: WP-1185
2355c12
to
743c75d
Compare
Got confused by the example's name. Added another example for http proxy. Also updated the README.md. |
743c75d
to
e743c35
Compare
e743c35
to
b8e3e07
Compare
The
superagent-proxy
was removed earlier in this PR.And we have to use the proxy-agent now. But that change missed some old usage of the
superagent-proxy
.This PR also changed the proxy-agent version to 5.0. This is the version that was used under the hood before. The new version requires setting proxy url in the environment variable. It does not quite fit how we use the proxy-agent currently. If we want to upgrade to the latest proxy-agent, it should be done in a separate PR.
This change is tested with the new example codes and local proxy server. Verified that it is using the proxy by shutting down the proxy and saw the connection failure error.
Ticket: WP-1185