diff --git a/src/main/helpers.js b/src/main/helpers.js index 9cc13aee..ebf327b6 100644 --- a/src/main/helpers.js +++ b/src/main/helpers.js @@ -112,12 +112,6 @@ export function isValidEndpoint(endpoint) { if (!isValidDomain(endpoint) && !isValidIP(endpoint)) { return false } - // Endpoint matches amazon, make sure its 's3.amazonaws.com' - if (endpoint.match('.amazonaws.com$') || endpoint.match('.amazonaws.com.cn$')) { - if (!isAmazonEndpoint(endpoint)) { - return false - } - } // Return true. return true } diff --git a/src/test/unit/test.js b/src/test/unit/test.js index 55e022de..de83c97e 100644 --- a/src/test/unit/test.js +++ b/src/test/unit/test.js @@ -33,8 +33,8 @@ describe('Helpers', () => { it('should validate for s3 china', () => { assert.equal(isValidEndpoint('s3.cn-north-1.amazonaws.com.cn'), true) }) - it('should fail for invalid endpoint', () => { - assert.equal(isValidEndpoint('s3-us-west-2.amazonaws.com'), false) + it('should validate for us-west-2', () => { + assert.equal(isValidEndpoint('s3-us-west-2.amazonaws.com'), true) }) it('should fail for invalid endpoint characters', () => { assert.equal(isValidEndpoint('111.#2.11'), false)