diff --git a/.changeset/honest-pillows-tease.md b/.changeset/honest-pillows-tease.md new file mode 100644 index 000000000000..d131858d1950 --- /dev/null +++ b/.changeset/honest-pillows-tease.md @@ -0,0 +1,5 @@ +--- +"wrangler": patch +--- + +Remove CF-Connecting-IP for requests to the edge preview diff --git a/packages/wrangler/src/api/startDevWorker/RemoteRuntimeController.ts b/packages/wrangler/src/api/startDevWorker/RemoteRuntimeController.ts index fdff4625e3eb..1cae5c2be8aa 100644 --- a/packages/wrangler/src/api/startDevWorker/RemoteRuntimeController.ts +++ b/packages/wrangler/src/api/startDevWorker/RemoteRuntimeController.ts @@ -267,6 +267,9 @@ export class RemoteRuntimeController extends RuntimeController { ...(accessToken ? { Cookie: `CF_Authorization=${accessToken}` } : {}), + // Make sure we don't pass on CF-Connecting-IP to the remote edgeworker instance + // Without this line, remote previews will fail with `DNS points to prohibited IP` + "cf-connecting-ip": "", }, liveReload: config.dev.liveReload, proxyLogsToController: true,