File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
packages/miniflare/src/http Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -197,8 +197,11 @@ export class DispatchFetchDispatcher extends undici.Dispatcher {
197197 path : string // Including query parameters
198198 ) {
199199 // Reconstruct URL using runtime origin specified with `dispatchFetch()`
200- const originalURL = this . userRuntimeOrigin + path ;
201- headers . set ( CoreHeaders . ORIGINAL_URL , originalURL ) ;
200+ // Only set if not already present (e.g., set by #fetcherFetchCall in proxy client)
201+ if ( ! headers . has ( CoreHeaders . ORIGINAL_URL ) ) {
202+ const originalURL = this . userRuntimeOrigin + path ;
203+ headers . set ( CoreHeaders . ORIGINAL_URL , originalURL ) ;
204+ }
202205 headers . set ( CoreHeaders . DISABLE_PRETTY_ERROR , "true" ) ;
203206 if ( this . cfBlobJson !== undefined ) {
204207 // Only add this header if a `cf` override was set
You can’t perform that action at this time.
0 commit comments