title: Request to /api folder from getInitialProps
body: <p>In my app, I'm sending request from <code>getInitialProps</code> to an api endpoint (in /api folder).
  When running my app in localhost, everything works, because it's all under same domain (localhost).</p>
  <p>After deploying my app successfully to aws lambda (using <code>serverless-next.js</code>), those requests doesn't work anymore.<br />
  The reason is that the host header when running <code>getInitialProps</code> in server, is <code>myAppBucket.s3.us-east-1.amazonaws.com</code>, but the app domain is <code>https://d25q7fh11ll2cg.cloudfront.net</code>.
  request to <code>myAppBucket.s3.us-east-1.amazonaws.com/api/users</code> doesn't work but to <code>https://d25q7fh11ll2cg.cloudfront.net/api/users</code> works.
  But I don't have the domain data (i.e <code>https://d25q7fh11ll2cg.cloudfront.net/api/users</code>) when running <code>getInitialProps</code>.</p>
  <p>I don't want to put the domain as an env var. there is another solution for this?
  Also, calling directly the handler function from <code>getInitialProps</code> is problematic because the handler use a server-side only packages.
  Thanks</p>