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
  • !892

Updating the upgrading doc

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/donasaur/patch-1 into master Oct 18, 2015
  • Overview 1
  • Commits 1
  • Pipelines 0
  • Changes 1

Created by: donasaur

Recently ran into a case where I had to upgrade the http-proxy version for an app, and that app was using a proxy table.

I'm not sure how many users are still using the 0.x.x version of http-proxy, but the added link (found from one of the GH issues) may encourage them to switch over to 1.x.x if they were using the old version due to its proxy table support and the activation energy to upgrade was too high.

Edit: There was some work involved in creating a proxy table to map paths to urls, disregarding the source's hostname, so I'm not sure if this would warrant creating a module (w/ source hostname support). Here's the relevant code if you also want to add it to the README:

    for (var pathPrefix in proxyTable) {
        if (proxyTable.hasOwnProperty(pathPrefix)) {
            if (path.indexOf(pathPrefix) === 0) {
                req.url = path.replace(pathPrefix, '');
                target = proxyTable[pathPrefix]; // this is the reverse proxy target
                break;
            }
        }
    }
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/donasaur/patch-1