From 2a1b5d4de8556ae65e58d4c19afb9140eca8f68e Mon Sep 17 00:00:00 2001 From: arc-alex Date: Wed, 6 Dec 2023 21:12:52 +0100 Subject: [PATCH] Revert "add options to post" This reverts commit 0523a68ef4f0f529c936be113f295dfba23af32f. --- .../src/services/integration-service/HttpIntegration.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/apps/server/src/services/integration-service/HttpIntegration.ts b/apps/server/src/services/integration-service/HttpIntegration.ts index f35b7eaf9..ddeb03d74 100644 --- a/apps/server/src/services/integration-service/HttpIntegration.ts +++ b/apps/server/src/services/integration-service/HttpIntegration.ts @@ -87,6 +87,14 @@ export class HttpIntegration implements IIntegration { const templateUrl = parseTemplateNested(url, state || {}); const templateOptions = parseTemplateNested(options, state || {}); try { + const parsedUrl = new globalThis.URL(templateUrl); + // if (parsedUrl.protocol != 'http:') { + // logger.error(LogOrigin.Tx, `HTTP Integration: Only HTTP allowed, got ${parsedUrl.protocol}`); + // return { + // success: false, + // message: `Only HTTP allowed, got ${parsedUrl.protocol}`, + // }; + // } this.emit(templateUrl, templateOptions, method); } catch (err) { logger.error(LogOrigin.Tx, `HTTP Integration: ${err}`); @@ -108,7 +116,6 @@ export class HttpIntegration implements IIntegration { }); } else if (method === 'POST') { await got.post(path, { - body: options, retry: { limit: this.retryCount }, }); }