Add some logging to discover what cloudflare is doing

This commit is contained in:
Eric Allam
2022-06-07 13:55:46 +01:00
parent bc5e5561c7
commit 0358dbd5e2
+4
View File
@@ -157,6 +157,10 @@ function rewriteUrl(url: URL | string): URL {
const unmodifiedUrl =
typeof url === "string" ? new URL(url) : new URL(url.href);
console.log(
`[getPreview][rewriteUrl] ${unmodifiedUrl.href}, protocol: ${unmodifiedUrl.protocol}, hostname: ${unmodifiedUrl.hostname}, pathname: ${unmodifiedUrl.pathname}, search: ${unmodifiedUrl.search}, hash: ${unmodifiedUrl.hash}`
);
// Rewrite the URL if it is a relative URL
if (unmodifiedUrl.protocol === "ipfs:") {
if (unmodifiedUrl.hostname === "") {