File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -150,18 +150,18 @@ export function setupOutgoing(
150150 if ( options . changeOrigin ) {
151151 outgoing . headers . host =
152152 target . protocol !== undefined &&
153- required ( outgoing . port , target . protocol ) &&
154- ! hasPort ( outgoing . host )
153+ required ( outgoing . port , target . protocol ) &&
154+ ! hasPort ( outgoing . host )
155155 ? outgoing . host + ":" + outgoing . port
156156 : outgoing . host ;
157157 }
158158
159- outgoing . url =
160- target . href ||
159+ outgoing . url = ( "href" in target &&
160+ target . href ) ||
161161 ( target . protocol === "https" ? "https" : "http" ) +
162- "://" +
163- outgoing . host +
164- ( outgoing . port ? ":" + outgoing . port : "" ) ;
162+ "://" +
163+ outgoing . host +
164+ ( outgoing . port ? ":" + outgoing . port : "" ) ;
165165
166166 if ( req . httpVersionMajor > 1 ) {
167167 for ( const header of HTTP2_HEADER_BLACKLIST ) {
You can’t perform that action at this time.
0 commit comments