Skip to content

Commit

Permalink
fix: use body
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoIeni committed Sep 23, 2024
1 parent 0750560 commit 8df16d4
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ echo " curl https://sh.rustup.rs -sSf | sh"
if (request.uri.startsWith('/doc/master')) {
// The slice method is used to remove the '/doc/master' prefix from the
// URI. 11 is the length of '/doc/master'.
return redirect('https://doc.rust-lang.org/stable' + request.uri.slice(11), callback);
const newUri = 'https://doc.rust-lang.org/stable' + request.uri.slice(11);
const body = "The documentation now lives under doc.rust-lang.org";
return redirect(newUri, body, callback);
}

callback(null, request);
Expand Down

0 comments on commit 8df16d4

Please sign in to comment.