Skip to content

Commit

Permalink
CR
Browse files Browse the repository at this point in the history
  • Loading branch information
MoLow committed Sep 27, 2023
1 parent 69c2698 commit 7c13ad4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/handlers/get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ const getHandler: Handler = async (request, env, ctx, cache) => {
// file paths if directory listing is off
return responses.FILE_NOT_FOUND(request);
} else if (isPathADirectory && !hasTrailingSlash(bucketPath)) {
return Response.redirect(url.toString() + '/', 301);
url.pathname += '/';
return Response.redirect(url.toString(), 301);
}

const response: Response = isPathADirectory
Expand Down

0 comments on commit 7c13ad4

Please sign in to comment.