bugfix: self-host crawling doesnt respect limit

This commit is contained in:
busaud 2024-10-09 22:52:49 +00:00
parent 52ec43aac3
commit c6ebbc6f6a

View File

@ -34,7 +34,11 @@ export async function crawlController(
await logCrawl(id, req.auth.team_id);
const { remainingCredits } = req.account;
let { remainingCredits } = req.account;
const useDbAuthentication = process.env.USE_DB_AUTHENTICATION === 'true';
if(!useDbAuthentication){
remainingCredits = Infinity;
}
const crawlerOptions = legacyCrawlerOptions(req.body);
const pageOptions = legacyScrapeOptions(req.body.scrapeOptions);