Skip to content

Commit

Permalink
allow extra aws region
Browse files Browse the repository at this point in the history
  • Loading branch information
xiazhvera committed Jun 3, 2024
1 parent 42c2d9d commit a5179fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion device/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ function DeviceClient(options) {
}

if (!isUndefined(options.host) && isUndefined(options.region)) {
var pattern = /[a-zA-Z0-9]+\.iot\.([a-z]+-[a-z]+-[0-9]+)\.amazonaws\..+/;
var pattern = /[a-zA-Z0-9]+\.iot\.([a-z]+[-[a-z]+]*-[a-z]+-[0-9]+)\.amazonaws\..+/;
var region = pattern.exec(options.host);
if (region === null) {
console.log('Host endpoint is not valid');
Expand Down

0 comments on commit a5179fd

Please sign in to comment.