From 561864422db2ec3eaddc2d790cc4ea0406eebf32 Mon Sep 17 00:00:00 2001 From: Alan Shaw Date: Tue, 14 May 2024 12:42:52 +0100 Subject: [PATCH] fix: `encodeURIComponent` on bucket origin (#1448) --- packages/upload-api/src/blob/accept.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/upload-api/src/blob/accept.js b/packages/upload-api/src/blob/accept.js index e06bc0afe..cab830ae9 100644 --- a/packages/upload-api/src/blob/accept.js +++ b/packages/upload-api/src/blob/accept.js @@ -34,7 +34,7 @@ export function blobAcceptProvider(context) { const content = createLink(rawCode, digest) const url = /** @type {API.URI<'https:'>} */ - (`https://w3s.link/ipfs/${content}?format=raw&origin=r2://${R2_REGION}/${R2_BUCKET}`) + (`https://w3s.link/ipfs/${content}?format=raw&origin=${encodeURIComponent(`r2://${R2_REGION}/${R2_BUCKET}`)}`) const locationClaim = await Assert.location.delegate({ issuer: context.id,