diff --git a/src/service/restservice.ts b/src/service/restservice.ts index 311c5f2..8c75c18 100644 --- a/src/service/restservice.ts +++ b/src/service/restservice.ts @@ -79,6 +79,12 @@ export class RestServiceT { // BUGBUG: consider the bug of replace with {} on logger. `ARGS=${JSON.stringify(config['params'])}, BODY=${JSON.stringify(config['data'])}`); + config['withCredentials'] = false; // CORS + + // uploading or other request body size + config['maxContentLength'] = Infinity; + config['maxBodyLength'] = Infinity; + return extraConfig ? {...config, ...extraConfig} : config; }) .setResponseInterceptors((response) => { diff --git a/tests/src/scripting/scriptrunner.test.ts b/tests/src/scripting/scriptrunner.test.ts index 8e66364..56e9c65 100644 --- a/tests/src/scripting/scriptrunner.test.ts +++ b/tests/src/scripting/scriptrunner.test.ts @@ -229,7 +229,7 @@ describe("test scripting runner function", () => { await downloadFileByHiveUrl(true); }); - test("testDownloadFileByHiveUrlWithReal", async () => { + test.skip("testDownloadFileByHiveUrlWithReal", async () => { const checkHiveUrl = async (url) => { const buffer = await scriptRunner.downloadFileByHiveUrl(url); expect(buffer).not.toBeNull();