0x6a69616e/kpsdk-solver

Kasada Catching Up :P

0x6a69616e opened this issue · 3 comments

I'm unexpectedly receiving new errors with my formerly working new build. Something about insecurity...?

The view-source URL hack probably might have to be dumped :(

Playwright provides an option for page.goto() to await until "...network response is received and the document [has] started loading."

await page.goto('https://sdk.vercel.ai', {
    waitUntil: 'commit'
});
await page.setContent('');

Setting the page content to nothing right after seems to bypass the error.

The fix minimizes content rendering, but some scripts may still be loaded.

I occasionally develop the best ideas right before I sleep:

async function handler(route, request) {
  await route.fulfill({
    status: 200,
    body: ''
  });
}

await page.route('*/**', handler);
await page.goto('https://sdk.vercel.ai');
await page.unroute('*/**', handler);

The target URL for page.goto() is routed to a completely blank page. That way, we can execute our own scripts without any concern of Same-Origin or unnecessary content/script rendering.