Optimize debug logs by truncating CDN URLs

Attachments are end-to-end encrypted, and these lengthy URLs don't
provide any meaningful info for debugging purposes.
This commit is contained in:
Fedor Indutny 2023-06-01 11:28:16 -07:00 committed by GitHub
parent a56a50ad19
commit ab68e24805
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2534,6 +2534,12 @@ export function initialize({
type: 'POST',
version,
headers,
redactUrl: () => {
const tmp = new URL(signedUploadLocation);
tmp.search = '';
tmp.pathname = '';
return `${tmp}[REDACTED]`;
},
}
);