title: Host: localhost. is not in the cert's altnames
body: <p>I'm getting the below error while doing server-side rendering.</p>
  <pre><code>RENDERING ERROR: { [Error: Network error: request to https://api-dev.xyz.io/graphql failed, reason: Hostname/IP doesn't match certificate's altnames: &quot;Host: localhost. is not in the cert's altnames: DNS:*.xyz.io&quot;]
    graphQLErrors: null,
    networkError: 
     { [FetchError: request to https://api-dev.xyz.io/graphql failed, reason: Hostname/IP doesn't match certificate's altnames: &quot;Host: localhost. is not in the cert's altnames: DNS:*.xyz.io&quot;]
       name: 'FetchError',
       message: 'request to https://api-dev.xyz.io/graphql failed, reason: Hostname/IP doesn\'t match certificate\'s altnames: &quot;Host: localhost. is not in the cert\'s altnames: DNS:*.xyz.io&quot;',
       type: 'system',
       errno: undefined,
       code: undefined },
    message: 'Network error: request to https://api-dev.xyz.io/graphql failed, reason: Hostname/IP doesn\'t match certificate\'s altnames: &quot;Host: localhost. is not in the cert\'s altnames: DNS:*.xyz.io&quot;',
    extraInfo: undefined }
  </code></pre>
  <p><strong>Note:-</strong> I'm using react, redux, apollo-client(GraphQL) and ExpressJS(NodeJS). The API server to which I'm making the request is on another domain and I can't make any change on that.</p>
  <p>While working with client-side rendering I'm not facing any difficulties everything is working as intended but while doing server-side render I'm getting the above error.</p>
  <p><strong>So I tried the below approaches on my server but still no luck.</strong></p>
  <ol>
  <li><p>Adding self-signed certificate</p>
  </li>
  <li><p>Adding 'rejectUnauthorized':false in https options.</p>
  <pre><code>const options = {
    'key': key,
    'cert': cert,
    'ca': [ fs.readFileSync('local-certificate.pem') ],
    'rejectUnauthorized':false
  };
  
  https.createServer(options, app).listen(httpsPort, '0.0.0.0', function onStart(err) {
    if (err) { console.log(err); }
    console.info('==&gt; Listening on httpsPort %s. Open up http://0.0.0.0:%s/ in your browser.', httpsPort, options);
  });
  </code></pre>
  </li>
  <li><p>Also I tried to add an alt name in my self-signed certificate with the help of <a href="https://stackoverflow.com/questions/21488845/how-can-i-generate-a-self-signed-certificate-with-subjectaltname-using-openssl?answertab=votes#tab-top">How can I generate a self-signed certificate with SubjectAltName using OpenSSL?</a></p>
  </li>
  </ol>
  <p>Is there any way to bypass certificate verification so that my express server can make a request to the API server which is on another domain with a valid certificate?</p>
  <p><strong>I'm still a bit unsure whether I can fix it by making any changes at my end (on my express server).</strong></p>
  <p>Please let me know any insights on this.</p>