Skip to content

Commit

Permalink
Merge pull request #74 from 0xR/remove-host-header
Browse files Browse the repository at this point in the history
Don't proxy host header
  • Loading branch information
raxpost authored May 28, 2018
2 parents e77699a + 4b885c8 commit cd7c340
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ const resolver = (endpoint: Endpoint, proxyUrl: ?(Function | string), customHead
const proxy = !proxyUrl ? opts.GQLProxyBaseUrl : (typeof proxyUrl === 'function' ? proxyUrl(opts) : proxyUrl);
const req = endpoint.request(args, proxy);
if (opts.headers) {
req.headers = Object.assign(customHeaders, req.headers, opts.headers);
const { host, ...otherHeaders } = opts.headers;
req.headers = Object.assign(customHeaders, req.headers, otherHeaders);
}
const res = await rp(req);
return JSON.parse(res);
Expand Down

0 comments on commit cd7c340

Please sign in to comment.