modify RequestWithWAFSession

This commit is contained in:
Nite07 2024-12-04 21:50:23 +08:00
parent f6469471bb
commit d34ae73997

View File

@ -165,5 +165,12 @@ func RequestWithWAFSession(method string, URL string, wafSession Session, option
options.Headers[key] = value
}
return cycletlsClient.Do(URL, *options, method)
resp, err := cycletlsClient.Do(URL, *options, method)
if err != nil {
return resp, err
}
if resp.Status == 403 {
return resp, errors.New("Cloudflare blocked request")
}
return resp, nil
}