Skip to content

Commit

Permalink
fix : StaticBuketRout
Browse files Browse the repository at this point in the history
  • Loading branch information
AssahBismarkabah committed Sep 20, 2024
1 parent 16f453a commit b1d79e0
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ public String resourceKey(AbsoluteLocation resource) {
UnaryOperator<String> trimStartingSlash = str -> str.replaceFirst("^/", "");

String resourcePath = trimStartingSlash.apply(resource.location().getRawPath());
if (resourcePath.startsWith("eu-central-1/")) {
resourcePath = resourcePath.substring("eu-central-1/".length());
}

if (bucketName == null || "".equals(bucketName) || !resourcePath.startsWith(bucketName)) {
return resourcePath;
}
Expand Down

0 comments on commit b1d79e0

Please sign in to comment.