Skip to content

Proxy hangs if target requires basic authN #633

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

Closed
pulkitsinghal opened this issue Apr 29, 2014 · 1 comment
Closed

Proxy hangs if target requires basic authN #633

pulkitsinghal opened this issue Apr 29, 2014 · 1 comment

Comments

@pulkitsinghal
Copy link

When I try proxy to a site which requires basic authN, the code just hangs (i see no activity after my last log statement) and I am not sure how to debug it further:

var proxy = httpProxy.createProxyServer({});
var app = express();
app.all('/lame/api/versioning',  function (req, res) {
  console.log('/lame/api/versioning \n matched \t' + req.url);
  req.url = '/super/cool';
  console.log(' re-routing \t' + req.url);
  req.headers["Authorization"] = 'Basic base64encodedSTUFF';
  proxy.web(req, res, { target: 'https://secure.app.com:443' });
});
app.listen(8000);
console.log("listening on port 8000");

Thoughts?

@pulkitsinghal
Copy link
Author

Nevermind, the hanging part had to do with body-parser and connect-restreamer as outlined in #180

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

1 participant