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

Route-specific parameters into routes table & rewriteURL param

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/Matwolf08/master into master Mar 22, 2012
  • Overview 1
  • Commits 2
  • Pipelines 0
  • Changes 1

Created by: Matwolf08

Using node-http-proxy I ran into need of perform URL rewriting only for some of the routes specified into routes table. I have implemented the possibility of specify multiple parameters for every route of the routes table and configured a new "rewriteURL" parameter that permits to conditionally check if the URL rewriting must be performed or not for the matched entry of the routes table.

In this way, the routes must be specified as follows:

router: { 'www.example.com/route1': { target:'127.0.0.1:8000' }, //For the following entry I need to perform rewriting: 'www.example.com/route2': { target:'127.0.0.1:8001', rewriteURL:true}, 'www.example.com': { target:'127.0.0.1:3000' } }

For my needs, this feature is very useful! I hope that will be useful for others too!

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