Skip to content

Commit 2636301

Browse files
authored
Fix: Strip endpoint hostname trailing slash (#229)
1 parent e6bc71c commit 2636301

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ class LocalstackPlugin {
393393
// - https://2e22431f.execute-api.us-east-1.localhost
394394
// - https://2e22431f.execute-api.us-east-1.localhost.localstack.cloud
395395
// - https://2e22431f.execute-api.us-east-1.amazonaws.com
396-
const regex2 = /[^\s:]*:\/\/([^.]+)\.execute-api\.[^/]+(\/([^/]+)(\/.*)?)?/g;
396+
const regex2 = /[^\s:]*:\/\/([^.]+)\.execute-api\.[^/]+(([^/]+)(\/.*)?)?\/*$/g;
397397
const replace2 = `https://$1.execute-api.localhost.localstack.cloud:${edgePort}$2`;
398398
endpoints[idx] = entry.replace(regex2, replace2);
399399
});

0 commit comments

Comments
 (0)