Browse Source

Disable proxy if legacyUrl config entry is missing

pull/213/head
Julian Simioni 9 years ago
parent
commit
42abb809f6
  1. 4
      routes/legacy.js

4
routes/legacy.js

@ -1,6 +1,10 @@
var proxy = require('express-http-proxy');
function addRoutes(app, peliasConfig) {
if (!peliasConfig.hasOwnProperty('legacyUrl')) {
return;
}
var sendToLegacy = proxy(peliasConfig.legacyUrl, {
forwardPath: function(req, res) {
return require('url').parse(req.url).path;

Loading…
Cancel
Save