Skip to content

Commit

Permalink
Merge pull request #719 from azimgd/fix/redirection
Browse files Browse the repository at this point in the history
fix redirection issue #715
  • Loading branch information
behrad committed Oct 1, 2015
2 parents 447f525 + 048e3e4 commit 465863e
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions lib/http/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,7 @@ app.post('/job', provides('json'), bodyParser.json(), json.createJob);

// routes

app.get('/', function( req, res ) {
var context = app.mountpath || req.baseUrl;

// Strip trailing slash from context
if( context && context[context.length - 1] === '/' ) {
context = context.substring(0, context.length - 1);
}

res.redirect(context + '/active');
});
app.get('/', routes.jobs('active'));

app.get('/active', routes.jobs('active'));
app.get('/inactive', routes.jobs('inactive'));
Expand Down

0 comments on commit 465863e

Please sign in to comment.