Skip to content

Commit

Permalink
fix(minor version redirect): Add leading / to redirected uri also
Browse files Browse the repository at this point in the history
  • Loading branch information
nain-F49FF806 authored Oct 9, 2024
1 parent 154cad5 commit 4ceb656
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ exports.handler = (event, context, callback) => {
// Include patch version 0 if minor versioned documentation is requested
const minor_versioned_pattern = /^\/?(\d+)\.(\d+)\/(.*)/
if (minor_versioned_pattern.test(request.uri)) {
const patched_uri = request.uri.replace(minor_versioned_pattern, "$1.$2.0/$3");
const patched_uri = request.uri.replace(minor_versioned_pattern, "/$1.$2.0/$3");
return temp_redirect(patched_uri, callback);
}

Expand Down

0 comments on commit 4ceb656

Please sign in to comment.