tg-redbird 1.1.0 → 1.2.0-rc

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/proxy.js +1 -1
  2. package/package.json +1 -1
package/lib/proxy.js CHANGED
@@ -684,7 +684,7 @@ ReverseProxy.prototype._getTarget = function (src, req, res) {
684
684
  req.host = target.host;
685
685
  }
686
686
 
687
- if (route.opts.onRequest) {
687
+ if (_.get(route, "opts.onRequest")) {
688
688
  const resultFromRequestHandler = route.opts.onRequest(req, res, target);
689
689
  if (resultFromRequestHandler !== undefined) {
690
690
  this.log &&
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tg-redbird",
3
- "version": "1.1.0",
3
+ "version": "1.2.0-rc",
4
4
  "description": "A reverse proxy with support for dynamic tables",
5
5
  "main": "index.js",
6
6
  "scripts": {