Skip to content

Commit e20a0bb

Browse files
committed
adbeta credentials
1 parent b6157cf commit e20a0bb

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

modules/dasBidAdapter.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,14 +335,17 @@ export const spec = {
335335
const baseUrl = getEndpoint(data.ext.network);
336336
const fullUrl = `${baseUrl}?data=${encodeURIComponent(jsonData)}`;
337337

338+
// adbeta needs credentials omitted to avoid CORS issues, especially in Firefox
339+
const useCredentials = !(!!data.ext?.adbeta);
340+
338341
// Switch to POST if URL exceeds 8k characters
339342
if (fullUrl.length > 8192) {
340343
return {
341344
method: 'POST',
342345
url: baseUrl,
343346
data: jsonData,
344347
options: {
345-
withCredentials: true,
348+
withCredentials: useCredentials,
346349
crossOrigin: true,
347350
customHeaders: {
348351
'Content-Type': 'text/plain'
@@ -355,7 +358,7 @@ export const spec = {
355358
method: 'GET',
356359
url: fullUrl,
357360
options: {
358-
withCredentials: true,
361+
withCredentials: useCredentials,
359362
crossOrigin: true,
360363
},
361364
};

0 commit comments

Comments
 (0)