const Winston = require('winston');
const tsFormat = () => (new Date());

class Util {

  static getLogger() {
    const logger = new (Winston.Logger)({
      level: 'debug',
      transports: [
        new (Winston.transports.Console)({
          timestamp: tsFormat,
          colorize: true
        })
      ]
    });
    return logger;
  }

  static getCorsConfing() {
    return (req, res, next) => {
      res.header("Access-Control-Allow-Origin", "*"); // restrict it to the required domain
      res.header('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE,OPTIONS');
      // Set custom headers for CORS
      res.header('Access-Control-Allow-Headers', 'Content-type,Accept,X-Access-Token,X-Key');
      if (req.method == 'OPTIONS') {
        res.status(200).end();
      } else {
        next();
      }
    };
  }

}

module.exports = Util;
@@ -341,492 +341,10 @@
   %7D%0A
-%0A
   
-static getCorsConfing() %7B%0A    return (req, res, next) =%3E %7B%0A      res.header(%22Access-Control-Allow-Origin%22, %22*%22); // restrict it to the required domain%0A      res.header('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE,OPTIONS');%0A      // Set custom headers for CORS%0A      res.header('Access-Control-Allow-Headers', 'Content-type,Accept,X-Access-Token,X-Key');%0A      if (req.method == 'OPTIONS') %7B%0A        res.status(200).end();%0A      %7D else %7B%0A        next();%0A      %7D%0A    %7D;%0A  %7D%0A
 %0A%7D%0A%0A

Remove config from utils