config.default.js 753 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: ["http://localhost:8080", "http://192.168.2.9:8080","*"] //允许访问接口的白名单
  };
  config.cors = {
    // 任何地址都可以访问
    origin:"*",
    // 指定地址才可以访问
    // origin: 'http://localhost:8080',
    // allowMethods: 'GET,PUT,POST,DELETE',
    allowMethods: '*',
    // cookie跨域配置
    credentials: true
  };

  return config
}