config.default.js 666 B

123456789101112131415161718192021222324
  1. 'use strict';
  2. const prod = require('./prod');
  3. /**
  4. * [总配置器]
  5. * @author szjcomo
  6. * @createTime 2020-08-03
  7. * @param {[type]} appInfo [description]
  8. * @return {[type]} [description]
  9. */
  10. module.exports = appInfo => {
  11. const config = exports = {};
  12. // 2022/9/28 允许跨域请求所有资源
  13. /* config.cors = {
  14. origin: '*',
  15. // origin: [ 'http://localhost' ],
  16. allowMethods: 'GET,HEAD,PUT,POST,DELETE,PATCH',
  17. };*/
  18. // 用于cookie签名密钥,应更改为您自己的密钥并保持安全
  19. config.keys = appInfo.name + '_szjcomo-egg';
  20. const userConfig = prod(appInfo);
  21. return { ...config, ...userConfig };
  22. };