Skip to content

Commit

Permalink
fix: redirect static-router/doc/master to stable docs (#568)
Browse files Browse the repository at this point in the history
  • Loading branch information
softmoth committed Sep 21, 2024
1 parent 5a272d1 commit c1bc623
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,12 @@ echo " curl https://sh.rustup.rs -sSf | sh"
return redirect('https://sh.rustup.rs', body, callback);
}

// Links to `/doc/master/*` are probably from old external sources, so send
// them back through the doc site to take advantage of any helpful error
// handling that may be defined there
if (request.uri.startsWith('/doc/master')) {
return redirect('//doc.rust-lang.org/stable' + request.uri.slice(11), callback);
}

callback(null, request);
};

0 comments on commit c1bc623

Please sign in to comment.