Skip to content

Commit

Permalink
use https
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoIeni committed Sep 23, 2024
1 parent c1bc623 commit 5b84e4d
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ echo " curl https://sh.rustup.rs -sSf | sh"
// 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);
// 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);
}

callback(null, request);
Expand Down

0 comments on commit 5b84e4d

Please sign in to comment.