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

Support a proxy mode for outbound HTTP and HTTPS traffic #83

Closed
ozten opened this issue Jun 27, 2012 · 5 comments
Closed

Support a proxy mode for outbound HTTP and HTTPS traffic #83

ozten opened this issue Jun 27, 2012 · 5 comments

Comments

@ozten
Copy link
Contributor

ozten commented Jun 27, 2012

Please consider adding support for a HTTP proxy everywhere node-openid uses the http or https node module.

Suggested API:
node-openid would look for an environment variable HTTP_PROXY and if present, respect it.

Example:

export HTTP_PROXY=http://localhost:8080
node bin/server

Use Cases:

  1. Security and Performance
    When we deploy services, we put them behind squid or another proxy layer. This allows us to deny outbound http requests to unknown urls. It allows us to locally cache OpenID responses (for the calls that are cachable).

  2. Load Testing
    We're looking at also using this setting for load testing, so we don't hit 3rd party OpenID endpoints.

ozten added a commit to ozten/node-openid that referenced this issue Jun 28, 2012
@havard
Copy link
Owner

havard commented Jul 5, 2012

I have been gathering opinions on the matter through the nodejs mailing list and discussions with various developers. The environment variable proposal seems to be a good solution.

One suggestion though: How about splitting HTTP_PROXY into HTTP_PROXY_HOST and HTTP_PROXY_PORT (and add HTTPS_ variants)? This will align the settings with other existing solutions (notably Java).

@ozten
Copy link
Contributor Author

ozten commented Jul 5, 2012

Thanks for looking into this and coordinating with the broader community.

It would be good to use the same solution across this and node-oauth.
ciaranj/node-oauth#102

I'm fine with These env variables. I'll update my fork once I'm back from traveling.

I've also found separating HTTP and HTTPS settings useful.

@havard
Copy link
Owner

havard commented Jul 20, 2012

Merged and fixed in ead2635

@havard havard closed this as completed Jul 20, 2012
@ozten
Copy link
Contributor Author

ozten commented Jul 20, 2012

This is great, thanks again! Any timelines for a 0.4.3 release?

@havard
Copy link
Owner

havard commented Jul 20, 2012

I am gonna let it sit for a few days and see if anyone reports problems, then make a release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants