text: module.exports = (req, res, cb) => {
      // Set CORS headers for preflight requests
      // Allows GETs from any origin with the Content-Type header
      // and caches preflight response for 3600s
  
      res.set('Access-Control-Allow-Origin', '*');
  
      if (req.method === 'OPTIONS') {
          console.log('Received CORS OPTIONS')
          // Send response to OPTIONS requests
          res.set('Access-Control-Allow-Methods', 'POST');
          res.set('Access-Control-Allow-Headers', 'Content-Type');
          res.set('Access-Control-Max-Age', '3600');
          res.status(204).send('');
      } else {
          // Set CORS headers for the main request
          console.log('Received POST')
          res.set('Access-Control-Allow-Origin', '*');
          cb(req, res);
      }
  }
  