BoxOfColors Claude Sonnet 4.6 commited on
Commit
7eeb19b
·
1 Parent(s): 4afe095

fix: add credentials:'include' to regen fetch so HF cookies are sent

Browse files

ZeroGPU quota is attributed via the HF session cookie. Without
credentials:'include', the fetch to /gradio_api/queue/join omits
cookies because the Space origin (*.hf.space) differs from the HF
auth origin (huggingface.co), causing all regen calls to be treated
as unauthenticated (2min quota) even for PRO users.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -2093,6 +2093,7 @@ _GLOBAL_JS = """
2093
 
2094
  fetch('/gradio_api/queue/join', {
2095
  method: 'POST',
 
2096
  headers: {'Content-Type': 'application/json'},
2097
  body: JSON.stringify({
2098
  data: data,
 
2093
 
2094
  fetch('/gradio_api/queue/join', {
2095
  method: 'POST',
2096
+ credentials: 'include',
2097
  headers: {'Content-Type': 'application/json'},
2098
  body: JSON.stringify({
2099
  data: data,