Skip to content

Commit

Permalink
fix(docs): include string target example
Browse files Browse the repository at this point in the history
  • Loading branch information
dylang committed Feb 29, 2020
1 parent 1b44a94 commit 0562c57
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions README.md
Expand Up @@ -242,12 +242,17 @@ Providing an alternative way to decide which requests should be proxied; In case
'/rest' : 'http://localhost:8004' // path only
}

// Custom router function
// Custom router function (string target)
router: function(req) {
return 'http://localhost:8004';
}

// Custom router function (target object)
router: function(req) {
return {
protocol: 'https:', // The : is required
host: 'localhost',
port: 8004
protocol: 'https:', // The : is required
host: 'localhost',
port: 8004
};
}

Expand Down

0 comments on commit 0562c57

Please sign in to comment.