- Fix WA.

This commit is contained in:
Rodrigo Rodriguez (Pragmatismo) 2025-09-25 14:11:08 -03:00
parent 5d3146cd57
commit e2f079eeea

View file

@ -1209,13 +1209,12 @@ export class KBService implements IGBKBService {
await min.core['setConfig'](min, 'Color2', colors[1].hex());
}
// Disables images in crawling.
await page.setRequestInterception(true);
page.on('request', req => {
if (req.resourceType() === 'image' || req.resourceType() === 'stylesheet') {
req.abort();
await page.route('**/*', route => {
const type = route.request().resourceType();
if (type === 'image' || type === 'stylesheet') {
route.abort();
} else {
req.continue();
route.continue();
}
});