title: NextJs CORS issue
body: <p>I have a Next.js app hosted on Vercel at <a href="http://www.example.com" rel="noreferrer">www.example.com</a>, which needs to communicate with a backend .NET Core Web API hosted on a different server at api.example.com.
  The .NET core web api has been configured to allow CORS but my Next.js keeps complaining that data cannot be displayed when I use AXIOS to fetch data because the response lacks allow-cors headers:</p>
  <blockquote>
  <p>Access to XMLHttpRequest at 'https://api.example.com' from origin 'http://www.example.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource</p>
  </blockquote>
  <p>It works fine when I run it locally using <code>npm run dev</code>, but doesn't work when I build it and then run <code>npm run start</code></p>
  <p>Does anyone know how to fix the cors issue in production?</p>