title: What is secure configuration for cors used in Express.js API without compromising security?
body: <p>Is is safe to do <code>app.use(cors())</code> only. I am using cors package from npm</p>
  <p>Or, should anything needs to be configured keeping security in mind.</p>
  <p>I am building a express api that is used for:</p>
  <ul>
  <li>fetching data through GET requests to api endpoints.</li>
  <li>has signup and login functionality</li>
  <li>send API key through headers (will be implemented)</li>
  </ul>
  <p>What should be the ideal cors configuration for this api considering security?</p>
  <p>I can understand there is lot of resource on cors in the internet. But I cannot find anything specifically tells about configuring cors without compromising security.</p>