From 781b835466f225f42c6ec8b1489494ca745e58c7 Mon Sep 17 00:00:00 2001 From: Yanlong Wang Date: Wed, 17 Apr 2024 09:48:26 +0800 Subject: [PATCH] fix: keep url details --- backend/functions/src/cloud-functions/crawler.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/functions/src/cloud-functions/crawler.ts b/backend/functions/src/cloud-functions/crawler.ts index f5b90ce..fc7c1e7 100644 --- a/backend/functions/src/cloud-functions/crawler.ts +++ b/backend/functions/src/cloud-functions/crawler.ts @@ -168,7 +168,7 @@ ${this.content} const noSlashURL = ctx.req.url.slice(1); let urlToCrawl; try { - urlToCrawl = new URL(normalizeUrl(noSlashURL.trim())); + urlToCrawl = new URL(normalizeUrl(noSlashURL.trim(), { removeTrailingSlash: false, removeSingleSlash: false })); } catch (err) { throw new ParamValidationError({ message: `${err}`,