fix: keep url details

This commit is contained in:
Yanlong Wang 2024-04-17 09:48:26 +08:00
parent 11a5a90611
commit 781b835466
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); const noSlashURL = ctx.req.url.slice(1);
let urlToCrawl; let urlToCrawl;
try { try {
urlToCrawl = new URL(normalizeUrl(noSlashURL.trim())); urlToCrawl = new URL(normalizeUrl(noSlashURL.trim(), { removeTrailingSlash: false, removeSingleSlash: false }));
} catch (err) { } catch (err) {
throw new ParamValidationError({ throw new ParamValidationError({
message: `${err}`, message: `${err}`,