Skip to content

Commit

Permalink
ARSN-382: update redirect location condition
Browse files Browse the repository at this point in the history
Co-authored-by: Jonathan Gramain <[email protected]>
  • Loading branch information
BourgoisMickael and jonathan-gramain authored Jan 2, 2024
1 parent a167e1d commit f2974cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/s3routes/routesUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ export function redirectRequest(
}
let redirectLocation = justPath ? `/${redirectKey}` :
`${redirectProtocol}://${redirectHostName}/${redirectKey}`;
if (!redirectKey && redirectLocationHeader && redirectLocation.length > 1) {
if (!redirectKey && redirectLocationHeader && redirectLocation !== '/') {
// remove hanging slash
redirectLocation = redirectLocation.slice(0, -1);
}
Expand Down

0 comments on commit f2974cb

Please sign in to comment.