diff --git a/package.json b/package.json index f40d3f9..d3e704f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fortnight-web", - "version": "1.0.0-rc.2", + "version": "1.0.0-rc.2.1", "main": "index.js", "author": "Jacob Bare ", "license": "MIT", diff --git a/src/apollo/config.js b/src/apollo/config.js index 8f2cd89..20d1545 100644 --- a/src/apollo/config.js +++ b/src/apollo/config.js @@ -5,11 +5,12 @@ import fetch from 'isomorphic-unfetch'; export default (req) => { const headers = req ? req.headers : {}; - const uri = (req) ? `${req.protocol}://${req.get('host')}` : ''; - if (headers.host) { - headers['x-forwarded-host'] = headers.host; - delete headers.host; - } + const protocol = process.env.NODE_ENV === 'production' ? 'https' : 'http'; + const uri = (req) ? `${protocol}://${req.get('host')}` : ''; + // if (headers.host) { + // headers['x-forwarded-host'] = headers.host; + // delete headers.host; + // } return { link: ApolloLink.from([ onError(({ graphQLErrors, networkError }) => {