Skip to content
GitLab
    • Explore Projects Groups Snippets
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 13 years ago
  • 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!

Activity

  • Loading
Please register or sign in to reply
  1. 22 Mar, 2012 2 commits
    • Matteo Bonora's avatar
      Defined rewriteURL (route specific) parameter. · 37b8fa90
      Matteo Bonora authored 13 years ago
      If it is declared and setted to true into routes table, the http proxy will perform URL Rewriting. If it's not declared or setted to false no rewriting will be performed.
      37b8fa90
    • Matteo Bonora's avatar
      Added support for specification of multiple parameters into routes table. · 887184e6
      Matteo Bonora authored 13 years ago
      887184e6
0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Labels
0
None
0
None
    Assign labels
  • Manage project labels

Milestone
No milestone
None
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
1
1 participant
Administrator
Reference: http-party/node-http-proxy!213
Source branch: github/fork/Matwolf08/master

Menu

Explore Projects Groups Snippets