From d18ccec351528b64684846cce247aaa248447b57 Mon Sep 17 00:00:00 2001 From: FKarstein <115079850+FKarstein@users.noreply.github.com> Date: Thu, 12 Mar 2026 12:39:47 +0000 Subject: [PATCH] fix(cloudflare): add baseURL if no operations but source was relative --- src/runtime/providers/cloudflare.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/runtime/providers/cloudflare.ts b/src/runtime/providers/cloudflare.ts index cd715c262..dd472dabc 100644 --- a/src/runtime/providers/cloudflare.ts +++ b/src/runtime/providers/cloudflare.ts @@ -1,4 +1,4 @@ -import { encodeQueryItem, joinURL } from 'ufo' +import { encodeQueryItem, hasProtocol, joinURL } from 'ufo' import { createOperationsGenerator } from '../utils/index' import { defineProvider } from '../utils/provider' @@ -46,7 +46,7 @@ export default defineProvider({ const operations = operationsGenerator(mergeModifiers as any) // https:///cdn-cgi/image// - const url = operations ? joinURL(baseURL, 'cdn-cgi/image', operations, src) : src + const url = operations ? joinURL(baseURL, 'cdn-cgi/image', operations, src) : hasProtocol(src) ? src : joinURL(baseURL, src) return { url,