Skip to content

Commit

Permalink
check for cross region on prior fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Chase Coalwell committed Dec 12, 2018
1 parent e8f847d commit bba4395
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/services/s3.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ AWS.util.update(AWS.S3.prototype, {
var bucket = httpRequest.virtualHostedBucket;
if (bucket && httpRequest.path) {
if (req.params && req.params.Key) {
if (httpRequest.path.indexOf('/' + AWS.util.uriEscapePath(req.params.Key)) === 0) {
if (httpRequest.path.indexOf('/' + AWS.util.uriEscapePath(req.params.Key)) === 0 && httpRequest.endpoint.host.indexOf(req.service.endpoint.host) === -1) {
return;
}
}
Expand Down

0 comments on commit bba4395

Please sign in to comment.