File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 } ;
You can’t perform that action at this time.
0 commit comments