cors.js 280 B

12345678
  1. function cors(req, res, next) {
  2. res.header("Access-Control-Allow-Origin", "*");
  3. res.header("Access-Control-Allow-Methods", "GET, PUT, PATCH, POST, DELETE");
  4. res.header("Access-Control-Allow-Headers", "Content-Type, Authorization");
  5. next();
  6. }
  7. module.exports = cors