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
  • Merge requests
  • !254

Added unix socket support to node-http-proxy

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/buschtoens/master into master May 29, 2012
  • Overview 5
  • Commits 4
  • Pipelines 0
  • Changes 4

Created by: buschtoens

http-proxy finally supports unix socket paths. This closes this issue. You can now do stuff like this:

var httpProxy = require("http-proxy");

var options = {
    hostnameOnly: true,
    router: {
        "mywebsite.com": "/tmp/node-http/mywebsite"
    }
};

var proxyServer = httpProxy.createServer(options).listen(80);

I mainly altered the ProxyTable.getProxyLocation function. Before it tries to split the given target string into host and port it now looks for a leading slash which determines a socketPath.

This commit is tested on normal routing like shown above. I haven't tested it on direct targets and WebSockets but it should work.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/buschtoens/master