Skip to content

Commit db78cd8

Browse files
committed
check for : in protocol
1 parent 5913937 commit db78cd8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/nuxt/src/runtime/plugins/sentry-cloudflare.server.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ export const sentryCloudflareNitroPlugin =
101101
logger.log("Nitro Cloudflare plugin did not detect a Cloudflare event type. Won't patch Cloudflare handler.");
102102
return handlerTarget.apply(handlerThisArg, handlerArgs);
103103
} else {
104-
const url = `${event.protocol}//${event.host}${pathname}`;
104+
// Usually, the protocol already includes ":"
105+
const url = `${event.protocol}${event.protocol.endsWith(':') ? '' : ':'}//${event.host}${pathname}`;
105106
const request = new Request(url, {
106107
method: event.method,
107108
headers: event.headers,

0 commit comments

Comments
 (0)