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

digest auth for websocket proxying #890

Closed
oskbor opened this issue Oct 14, 2015 · 0 comments
Closed

digest auth for websocket proxying #890

oskbor opened this issue Oct 14, 2015 · 0 comments

Comments

@oskbor
Copy link

oskbor commented Oct 14, 2015

Hi, I am trying to proxy a WebSocket to an endpoint which requires digest authentication.

 var HttpProxy = require('http-proxy'),
   http = require('http');
 var wsProxy = new HttpProxy.createProxyServer({target: 'ws://' + options.cameraIp, ws: true});
 var server = http.createServer();
 server.on('upgrade', function (req, socket, head) {
  wsProxy.ws(req, socket, head);
});

The first attempt gives a 401 (the digest challenge) which is never returned to the browser. How can I hook in / configure http-proxy to pass the 401 back to the browser when using websockets?

Tigge added a commit to Tigge/node-http-proxy that referenced this issue Jun 20, 2017
When the server do not accept the upgrade request for websockets the
response was previously not included and sent back. Now the proxy will
include the headers and the content from the server and the response in
these cases. Fixes http-party#890.

Change-Id: I6fc2745154e05585ca63309bb442afb60ee92082
Tigge added a commit to Tigge/node-http-proxy that referenced this issue Jun 20, 2017
When the server do not accept the upgrade request for websockets the
response was previously not included and sent back. Now the proxy will
include the headers and the content from the server and the response in
these cases. Fixes http-party#890.
Tigge added a commit to Tigge/node-http-proxy that referenced this issue Jun 20, 2017
When the server do not accept the upgrade request for websockets the
server's response was previously not included and sent back. Now the
proxy will include the response in these cases. Fixes http-party#890.

Change-Id: I142a15ee12603f54d611ae9362a94c62fb3c9f36
Tigge added a commit to Tigge/node-http-proxy that referenced this issue Jun 20, 2017
When the server do not accept the upgrade request for websockets the
server's response was previously not included and sent back. Now the
proxy will include the response in these cases. Fixes http-party#890.

Change-Id: I142a15ee12603f54d611ae9362a94c62fb3c9f36
jcrugzz pushed a commit that referenced this issue Apr 19, 2018
When the server do not accept the upgrade request for websockets the
server's response was previously not included and sent back. Now the
proxy will include the response in these cases. Fixes #890.

Change-Id: I142a15ee12603f54d611ae9362a94c62fb3c9f36
jcrugzz pushed a commit that referenced this issue Apr 20, 2018
When the server do not accept the upgrade request for websockets the
server's response was previously not included and sent back. Now the
proxy will include the response in these cases. Fixes #890.
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