Siddharth Ravikumar commited on
Commit
fe740a0
·
1 Parent(s): de82703

fix: add credentials 'include' to fetch calls for ZeroGPU Pro quota recognition

Browse files
Files changed (1) hide show
  1. frontend/js/alt_app.js +2 -0
frontend/js/alt_app.js CHANGED
@@ -26,6 +26,7 @@ async function callGradioApi(apiName, dataArr) {
26
  const res = await fetch(GRADIO_API + apiName, {
27
  method: 'POST',
28
  headers: { 'Content-Type': 'application/json' },
 
29
  body: JSON.stringify({ data: dataArr })
30
  });
31
 
@@ -42,6 +43,7 @@ async function callGradioApi(apiName, dataArr) {
42
  const sseRes = await fetch(streamUrl, {
43
  method: 'GET',
44
  headers: { 'Accept': 'text/event-stream' },
 
45
  cache: 'no-cache',
46
  });
47
 
 
26
  const res = await fetch(GRADIO_API + apiName, {
27
  method: 'POST',
28
  headers: { 'Content-Type': 'application/json' },
29
+ credentials: 'include',
30
  body: JSON.stringify({ data: dataArr })
31
  });
32
 
 
43
  const sseRes = await fetch(streamUrl, {
44
  method: 'GET',
45
  headers: { 'Accept': 'text/event-stream' },
46
+ credentials: 'include',
47
  cache: 'no-cache',
48
  });
49