@bigid/apps-infrastructure-node-js 1.181.3 → 1.183.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -39,9 +39,11 @@ const doCallToUrl = (bigidToken, requestMethod, endpoint, bodyJson) => __awaiter
39
39
  'Content-Type': 'application/json',
40
40
  Authorization: bigidToken,
41
41
  };
42
+ const parsedUrl = new URL(endpoint);
43
+ parsedUrl.pathname = parsedUrl.pathname.replace(/\/+/g, '/');
42
44
  const requestObj = {
43
45
  method: requestMethod,
44
- url: endpoint,
46
+ url: parsedUrl.toString(),
45
47
  headers: headers,
46
48
  httpsAgent: new https_1.Agent({
47
49
  rejectUnauthorized: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigid/apps-infrastructure-node-js",
3
- "version": "1.181.3",
3
+ "version": "1.183.1",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -40,10 +40,12 @@ export const doCallToUrl = async (
40
40
  'Content-Type': 'application/json',
41
41
  Authorization: bigidToken,
42
42
  };
43
+ const parsedUrl = new URL(endpoint);
44
+ parsedUrl.pathname = parsedUrl.pathname.replace(/\/+/g, '/');
43
45
 
44
46
  const requestObj: Record<string, any> = {
45
47
  method: requestMethod,
46
- url: endpoint,
48
+ url: parsedUrl.toString(),
47
49
  headers: headers,
48
50
  httpsAgent: new Agent({
49
51
  rejectUnauthorized: false,