fix: url wrong normalization

This commit is contained in:
Yanlong Wang 2024-04-17 09:55:41 +08:00
parent 781b835466
commit 6e36f0a447
No known key found for this signature in database
GPG Key ID: C0A623C0BADF9F37

View File

@ -168,7 +168,7 @@ ${this.content}
const noSlashURL = ctx.req.url.slice(1);
let urlToCrawl;
try {
urlToCrawl = new URL(normalizeUrl(noSlashURL.trim(), { removeTrailingSlash: false, removeSingleSlash: false }));
urlToCrawl = new URL(normalizeUrl(noSlashURL.trim(), { stripWWW: false, removeTrailingSlash: false, removeSingleSlash: false }));
} catch (err) {
throw new ParamValidationError({
message: `${err}`,