modify RequestWithWAFSession
This commit is contained in:
parent
f6469471bb
commit
d34ae73997
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user