config.default.js 1006 Bytes
// config/config.default.js
module.exports = appInfo => {
  const config = {}
  config.sequelize = {
    dialect: 'mysql',
    host: '192.168.3.222',
    port: 3307,
    database: 'huyue',
    username: 'root',
    password: 'Msd^*$@online'
  }
  config.keys = '123456'
  config.security = {
    csrf: {
      enable: false,
      ignoreJSON: true
    },
    domainWhiteList: [ '*' ]
    // domainWhiteList: ["http://localhost:8080", "http://192.168.2.9:8080","http://glsk-front.test.glsx.com.cn",] //允许访问接口的白名单
  };
  // config.cors = {
  //   // 任何地址都可以访问
  //   // origin: ctx => ctx.get('origin'), //这种方式是允许所有的IP+端口跨域访问
  //    // 任何地址都可以访问
  //   origin:"*",
  //   // 指定地址才可以访问
  //   // origin: 'http://localhost:8080',
  //   // allowMethods: 'GET,HEAD,PUT,POST,DELETE,PATCH,OPTIONS',
  //   allowMethods: '*',
  //   // cookie跨域配置
  //   credentials: true,
  // };

  return config
}