Dont send the normalized URL to the content-fetch service

URLs need to be sent to contentFetch exactly as they
were received, this is because many apps will use signed URLs
for PDFs being served from GCP or AWS. A signed URL needs to
keep all its query params in the same order to validate.
This commit is contained in:
Jackson Harper 2022-05-26 16:04:21 -07:00
parent 93b095818d
commit 0cabd26344

View file

@ -83,13 +83,14 @@ export const createPageSaveRequest = async (
priority = priority || (await getPriorityByRateLimit(userId))
// look for existing page
url = normalizeUrl(url, {
const normalizedUrl = normalizeUrl(url, {
stripHash: true,
stripWWW: false,
})
let page = await getPageByParam({
userId,
url,
url: normalizedUrl,
})
if (page) {
console.log('Page already exists', page)