From cf01a2c5047a9955d83ddb9faca31ae33c651bdf Mon Sep 17 00:00:00 2001 From: "yanlong.wang" Date: Mon, 10 Mar 2025 15:17:42 +0800 Subject: [PATCH] chore: add comments to clarify --- src/api/crawler.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/api/crawler.ts b/src/api/crawler.ts index 31d660f..980f0a2 100644 --- a/src/api/crawler.ts +++ b/src/api/crawler.ts @@ -228,6 +228,8 @@ export class CrawlerHost extends RPCHost { let chargeAmount = 0; const crawlerOptions = ctx.method === 'GET' ? crawlerOptionsHeaderOnly : crawlerOptionsParamsAllowed; + // ctx.url in Koa is still not a real URL, just the full path including search query. + // ctx.path in Koa does not include the search query. const targetUrl = await this.getTargetUrl(tryDecodeURIComponent(ctx.url), crawlerOptions); if (!targetUrl) { return await this.getIndex(auth);