Skip to content

Commit

Permalink
Fix bad redirect making grunt-brand-guide page unreachable
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Krinkle committed Sep 8, 2024
1 parent c01f3eb commit aebc731
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit aebc731

Please sign in to comment.