From aebc731198dfd3684589e57dc7c189dbfd643637 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Sun, 8 Sep 2024 16:00:40 -0700 Subject: [PATCH] Fix bad redirect making grunt-brand-guide page unreachable https://gruntjs.com/grunt-brand-guide was redirecting to "/api" due to being trapped by the back-compat redirect for pages like /grunt.config and /grunt.log. Ref https://github.com/gruntjs/grunt-docs/issues/100. --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index 996c54f..da3ad24 100644 --- a/server.js +++ b/server.js @@ -130,7 +130,7 @@ app.get('*', function (req, res, next) { req.url = req.url.toLowerCase(); var filePath = 'build/docs/' + req.url + '.html'; - if (req.url.indexOf('/grunt') === 0) { + if (req.url.indexOf('/grunt.') === 0) { res.redirect(301, '/api' + req.url); return; }