Skip to content

Commit 40ec3d4

Browse files
committed
Reverted Region Changes
1 parent 77230e8 commit 40ec3d4

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

lib/core/Util.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -239,20 +239,12 @@ export const validateAndSanitizeConfig = (config) => {
239239
}
240240

241241
export const getRegionEndpoint = (region, service = 'contentManagement') => {
242-
// Validate input
243-
if (!region || typeof region !== 'string') {
244-
throw new Error(`Invalid region '${region}' provided. Allowed regions are: ${regionHostMap.regions.map(r => r.id).join(', ')}`)
245-
}
246-
247-
// Case-sensitive matching: only match exact case
248242
const regionData = regionHostMap.regions.find(r =>
249243
r.id === region ||
250244
r.alias.some(alias => alias === region)
251245
)
252-
253246
if (!regionData) {
254247
throw new Error(`Invalid region '${region}' provided. Allowed regions are: ${regionHostMap.regions.map(r => r.id).join(', ')}`)
255248
}
256-
257249
return regionData.endpoints[service]?.replace(/^https?:\/\//, '')
258250
}

0 commit comments

Comments
 (0)