fix: remove turnstyle detection to check if it causes false-positives

This commit is contained in:
WebStreamr 2025-09-16 13:05:03 +00:00
parent c819dd6bb7
commit c10ca29fda
No known key found for this signature in database

View file

@ -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) {