Skip to content
This repository has been archived by the owner on Feb 22, 2020. It is now read-only.

Commit

Permalink
Merge pull request #15 from solocommand/sni-503s
Browse files Browse the repository at this point in the history
Prevent SNI errors due to host header in prod
  • Loading branch information
zarathustra323 authored and solocommand committed Nov 8, 2018
1 parent 36c642a commit 264c5fe
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/web/src/apollo/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ import withApollo from './WithApollo';
const config = (req) => {
const headers = req ? req.headers : {};
const host = (req) ? req.ROOT_URI : '';
if (headers.host) {
headers['x-forwarded-host'] = headers.host;
delete headers.host;
}
return {
link: ApolloLink.from([
onError(({ graphQLErrors, networkError }) => {
Expand Down

0 comments on commit 264c5fe

Please sign in to comment.