Skip to content

Commit a9920c1

Browse files
Updated host in headers (#27)
* Updated host in headers * spacing fix
1 parent a36bed4 commit a9920c1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/utils/proxy.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ export function modifyRequestUrl(ctx: IContext, mockConfig: MockConfig) {
5353
ctx.proxyToServerRequestOptions.host = updatedUrl.hostname;
5454
ctx.proxyToServerRequestOptions.path = `${updatedUrl.pathname}${updatedUrl.search}`;
5555
ctx.proxyToServerRequestOptions.port = updatedUrl.port || ctx.proxyToServerRequestOptions.port;
56+
ctx.proxyToServerRequestOptions.headers.host= updatedUrl.hostname;
5657
}
5758

5859
export function modifyRequestHeaders(ctx: IContext, mockConfig: MockConfig) {

0 commit comments

Comments
 (0)