Skip to content

Commit 91a99ad

Browse files
committed
fix: remove trailing slash from siteUrl
1 parent 7d66eab commit 91a99ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/providers/cloudflareOnProd.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export default defineProvider({
2222
params.push(`format=${format}`)
2323

2424
// Cloudflare Image Resizing needs full URL for same-origin API routes
25-
const fullSrc = src.startsWith('/') && siteUrl ? `${siteUrl}${src}` : src
25+
const fullSrc = src.startsWith('/') && siteUrl ? `${siteUrl.replace(/\/$/, '')}${src}` : src
2626

2727
return { url: `/cdn-cgi/image/${params.join(',')}/${fullSrc}` }
2828
},

0 commit comments

Comments
 (0)