Skip to content

Commit 32b3ce2

Browse files
committed
fix: add credentials: 'omit' to all calls to recruit
1 parent 9d36f9a commit 32b3ce2

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

.circleci/config.yml

+1
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,7 @@ workflows:
358358
branches:
359359
only:
360360
- develop
361+
- fix-gig-apply-issue
361362
# This is alternate dev env for parallel testing
362363
# Deprecate this workflow due to beta env shutdown
363364
# https://topcoder.atlassian.net/browse/CORE-251

src/server/services/recruitCRM.js

+15
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ export default class RecruitCRMService {
155155
'Content-Type': req.headers['content-type'],
156156
Authorization: this.private.authorization,
157157
},
158+
credentials: 'omit',
158159
});
159160
if (response.status === 429) {
160161
await new Promise(resolve => setTimeout(resolve, 30000)); // wait 30sec
@@ -198,6 +199,7 @@ export default class RecruitCRMService {
198199
'Content-Type': req.headers['content-type'],
199200
Authorization: this.private.authorization,
200201
},
202+
credentials: 'omit',
201203
});
202204
if (response.status === 429) {
203205
await new Promise(resolve => setTimeout(resolve, 30000)); // wait 30sec
@@ -243,6 +245,7 @@ export default class RecruitCRMService {
243245
'Content-Type': 'application/json',
244246
Authorization: this.private.authorization,
245247
},
248+
credentials: 'omit',
246249
});
247250
if (response.status === 429) {
248251
await new Promise(resolve => setTimeout(resolve, 30000)); // wait 30sec
@@ -267,6 +270,7 @@ export default class RecruitCRMService {
267270
'Content-Type': 'application/json',
268271
Authorization: this.private.authorization,
269272
},
273+
credentials: 'omit',
270274
})),
271275
)
272276
.then(async (allPages) => {
@@ -311,6 +315,7 @@ export default class RecruitCRMService {
311315
'Content-Type': req.headers['content-type'],
312316
Authorization: this.private.authorization,
313317
},
318+
credentials: 'omit',
314319
});
315320
if (response.status === 429) {
316321
await new Promise(resolve => setTimeout(resolve, 30000)); // wait 30sec
@@ -336,6 +341,7 @@ export default class RecruitCRMService {
336341
'Content-Type': req.headers['content-type'],
337342
Authorization: this.private.authorization,
338343
},
344+
credentials: 'omit',
339345
})),
340346
)
341347
.then(async (allPages) => {
@@ -382,6 +388,7 @@ export default class RecruitCRMService {
382388
'Content-Type': req.headers['content-type'],
383389
Authorization: this.private.authorization,
384390
},
391+
credentials: 'omit',
385392
});
386393
if (response.status === 429) {
387394
await new Promise(resolve => setTimeout(resolve, 30000)); // wait 30sec
@@ -430,6 +437,7 @@ export default class RecruitCRMService {
430437
'Content-Type': req.headers['content-type'],
431438
Authorization: this.private.authorization,
432439
},
440+
credentials: 'omit',
433441
});
434442
if (candidateResponse.status >= 300) {
435443
const error = {
@@ -480,6 +488,7 @@ export default class RecruitCRMService {
480488
'Content-Type': 'application/json',
481489
Authorization: this.private.authorization,
482490
},
491+
credentials: 'omit',
483492
body: JSON.stringify(form),
484493
});
485494
if (workCandidateResponse.status >= 300) {
@@ -503,6 +512,7 @@ export default class RecruitCRMService {
503512
Authorization: this.private.authorization,
504513
...formHeaders,
505514
},
515+
credentials: 'omit',
506516
body: fileData,
507517
});
508518
if (fileCandidateResponse.status >= 300) {
@@ -528,6 +538,7 @@ export default class RecruitCRMService {
528538
'Content-Type': req.headers['content-type'],
529539
Authorization: this.private.authorization,
530540
},
541+
credentials: 'omit',
531542
});
532543
if (applyResponse.status >= 300) {
533544
const errObj = await applyResponse.json();
@@ -554,6 +565,7 @@ export default class RecruitCRMService {
554565
'Content-Type': 'application/json',
555566
Authorization: this.private.authorization,
556567
},
568+
credentials: 'omit',
557569
body: JSON.stringify({
558570
candidate_slug: candidateData.slug,
559571
job_slug: id,
@@ -682,6 +694,7 @@ export default class RecruitCRMService {
682694
'Content-Type': 'application/json',
683695
Authorization: this.private.authorization,
684696
},
697+
credentials: 'omit',
685698
body: JSON.stringify(form),
686699
});
687700
if (response.status >= 300) {
@@ -704,6 +717,7 @@ export default class RecruitCRMService {
704717
Authorization: this.private.authorization,
705718
...formHeaders,
706719
},
720+
credentials: 'omit',
707721
body: fileData,
708722
});
709723
if (fileResponse.status >= 300) {
@@ -740,6 +754,7 @@ export default class RecruitCRMService {
740754
headers: {
741755
Authorization: this.private.authorization,
742756
},
757+
credentials: 'omit',
743758
});
744759
if (response.status === 429) {
745760
await new Promise(resolve => setTimeout(resolve, 30000)); // wait 30sec

0 commit comments

Comments
 (0)