123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- /* eslint valid-jsdoc: "off" */
- 'use strict';
- /**
- * @param {Egg.EggAppInfo} appInfo app info
- */
- module.exports = appInfo => {
- const config = exports = {};
- config.keys= 'siGeZuiShuAi';
- // post form请求 关闭csrf安全插件
- config.security = {
- csrf: {
- enable: false,
- ignoreJSON: true,
- },
- // domainWhiteList: [ 'http://www.baidu.com' ], // 配置白名单
- };
- config.mongoose = {
- // url: 'mongodb://172.17.0.1/info_admin', // 华为云 需连VPN
- url: 'mongodb://127.0.0.1/info_admin', // 本地
- // url: 'mongodb://172.17.222.95:27017/info_admin', // 正式-info_admin表用户
- options: {
- useUnifiedTopology: true,
- },
- };
- // 指定启动端口为7002
- config.cluster = {
- listen: {
- path: '',
- port: 7002,
- },
- };
- const userConfig = {
- // 跨域配置
- cors: {
- origin: '*', // 注释掉就是上面的white生效
- allowMethods: 'GET,HEAD,PUT,POST,DELETE,PATCH',
- },
- sessionTimeOut: 86400, // 24H
- dept1ObjectId: '5d4289205ffc6694f7e42082',
- defaultAdminRoleId: '5d030a91ebd90c299489c121',
- };
- return {
- ...config,
- ...userConfig,
- };
- };
|