Skip to content
This repository was archived by the owner on Dec 23, 2025. It is now read-only.

Commit 0e7b938

Browse files
author
Jez
committed
Merge PR ifindev#17: Prevent double https:// in R2 public URLs
2 parents 587f9a2 + b0bcb4d commit 0e7b938

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/lib/r2.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ export async function uploadToR2(
4646
}
4747

4848
// Return public URL of R2 (should be using custom domain)
49-
const publicUrl = `https://${(env as any).CLOUDFLARE_R2_URL}/${key}`;
49+
// CLOUDFLARE_R2_URL already includes the protocol (https://)
50+
const publicUrl = `${(env as any).CLOUDFLARE_R2_URL}/${key}`;
5051

5152
return {
5253
success: true,

0 commit comments

Comments
 (0)