/* eslint valid-jsdoc: "off" */ 'use strict'; const code = require('./code'); const files = require('./files'); const cms = require('./cms'); const log = require('./log'); const login = require('./login'); // const wx = require('./wx'); const naf = require('./naf'); // const journal = require('./journal'); /** * @param {Egg.EggAppInfo} appInfo app info */ module.exports = appInfo => { /** * built-in config * @type {Egg.EggAppConfig} **/ const config = exports = {}; // use for cookie sign key, should change to your own and keep security config.keys = appInfo.name + '_1637282221255_6501'; // add your middleware config here config.middleware = []; // add your user config here const userConfig = { // myAppName: 'egg', }; // 安全配置 config.security = { csrf: { // ignoreJSON: true, // 默认为 false,当设置为 true 时,将会放过所有 content-type 为 `application/json` 的请求 enable: false, }, }; config.cluster = { listen: { port: 18090, }, }; config.modules = { login: 'http://127.0.0.1:18095', code: 'http://127.0.0.1:18091', files: 'http://127.0.0.1:18093', naf: 'http://127.0.0.1:18096', cms: 'http://127.0.0.1:18092', log: 'http://127.0.0.1:18094', }; // 限制文件大小 config.multipart = { mode: 'stream', fileSize: '5mb', fileExtensions: [ '.zip', 'xlsx' ], // 新增允许接收的文件后缀 // whitelist: [], // 覆盖允许接收的文件后缀 }; config.jwt = { secret: '123456', }; config.apipath = { code, files, naf, cms, login, log }; return { ...config, ...userConfig, }; };