chore: add comments to clarify

This commit is contained in:
yanlong.wang 2025-03-10 15:17:42 +08:00
parent 531c660a5d
commit cf01a2c504
No known key found for this signature in database
GPG Key ID: C0A623C0BADF9F37

View File

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