fix: remove turnstyle detection to check if it causes false-positives
This commit is contained in:
parent
c819dd6bb7
commit
c10ca29fda
1 changed files with 2 additions and 4 deletions
|
|
@ -118,9 +118,7 @@ export class Fetcher {
|
|||
};
|
||||
|
||||
private async handleHttpCacheItem(ctx: Context, httpCacheItem: HttpCacheItem, url: URL, init?: CustomRequestInit): Promise<HttpCacheItem> {
|
||||
const triggeredCloudflareTurnstile = httpCacheItem.body.includes('cf-turnstile');
|
||||
|
||||
if (httpCacheItem.status && httpCacheItem.status >= 200 && httpCacheItem.status <= 399 && !triggeredCloudflareTurnstile) {
|
||||
if (httpCacheItem.status && httpCacheItem.status >= 200 && httpCacheItem.status <= 399) {
|
||||
return httpCacheItem;
|
||||
}
|
||||
|
||||
|
|
@ -128,7 +126,7 @@ export class Fetcher {
|
|||
throw new NotFoundError();
|
||||
}
|
||||
|
||||
if (httpCacheItem.headers['cf-mitigated'] === 'challenge' || triggeredCloudflareTurnstile) {
|
||||
if (httpCacheItem.headers['cf-mitigated'] === 'challenge') {
|
||||
const noFlareSolverr = init?.noFlareSolverr ?? false;
|
||||
const flareSolverrEndpoint = envGet('FLARESOLVERR_ENDPOINT');
|
||||
if (noFlareSolverr || !flareSolverrEndpoint) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue