returns.sendErrorAndEnd(c,formatCloudflareChallengeMessage("Sora request blocked by Cloudflare challenge (HTTP 403). Please switch to a clean proxy/network and retry.",resp.Header,body))
returns.sendErrorAndEnd(c,formatCloudflareChallengeMessage(fmt.Sprintf("Sora request blocked by Cloudflare challenge (HTTP %d). Please switch to a clean proxy/network and retry.",resp.StatusCode),resp.Header,body))
newJSONResponseWithHeader(http.StatusTooManyRequests,`<!DOCTYPE html><html><head><title>Just a moment...</title></head><body></body></html>`,"cf-mitigated","challenge"),
require.True(t,IsCloudflareChallengeResponse(http.StatusTooManyRequests,nil,[]byte(`<!DOCTYPE html><title>Just a moment...</title><script>window._cf_chl_opt={};</script>`)))
require.False(t,IsCloudflareChallengeResponse(http.StatusBadGateway,nil,[]byte(`<!DOCTYPE html><title>Just a moment...</title>`)))