From 0358dbd5e2350f5cbbe648d82cd74c53da9a330f Mon Sep 17 00:00:00 2001 From: Eric Allam Date: Tue, 7 Jun 2022 13:55:46 +0100 Subject: [PATCH] Add some logging to discover what cloudflare is doing --- app/services/uriPreview.server.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/services/uriPreview.server.ts b/app/services/uriPreview.server.ts index 303a93e..e789275 100644 --- a/app/services/uriPreview.server.ts +++ b/app/services/uriPreview.server.ts @@ -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 === "") {