Skip to content

Commit

Permalink
fix: rewrite host for localhost routing to services
Browse files Browse the repository at this point in the history
  • Loading branch information
zcstarr committed Aug 8, 2019
1 parent 1e737e9 commit 62d341e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/backends/httpBackend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const httpBackend = async (connectionInfo: ConnectionInfo, response: Resp
return new Promise((resolve) => {
logger.debug(`making request to backend on port ${port} with ${JSON.stringify(data)}`);
const requestData = JSON.stringify(data);
const requestHeaders = Object.assign({}, headers, { "content-length": `${requestData.length}` });
const requestHeaders = Object.assign({}, headers, { "content-length": `${requestData.length}`, "host": `${host}:${port}` });
const request = http.request(`http://${host}:${port}/`, {
headers: requestHeaders,
method,
Expand Down

0 comments on commit 62d341e

Please sign in to comment.