Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • N node-http-proxy
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 482
    • Issues 482
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 102
    • Merge requests 102
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • http ... PARTY!
  • node-http-proxy
  • Issues
  • #890
Closed
Open
Issue created Oct 14, 2015 by Administrator@rootContributor

digest auth for websocket proxying

Created by: oskbor

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?

Assignee
Assign to
Time tracking