Skip to content

Commit

Permalink
CU-3nuzpez - Fix an error about cors.
Browse files Browse the repository at this point in the history
  • Loading branch information
fred-yu-2013 authored and stiartsly committed Oct 9, 2022
1 parent 07e73a4 commit 3d57aa5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/service/restservice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ export class RestServiceT<T> {
// 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) => {
Expand Down
2 changes: 1 addition & 1 deletion tests/src/scripting/scriptrunner.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 3d57aa5

Please sign in to comment.