123456789101112131415161718192021222324252627282930313233343536373839 |
- 'use strict';
- const ErrorConfig = require('./config.error.js');
- module.exports = appInfo => {
- const config = {};
- /**
- * some description
- * @member Config#test
- * @property {String} key - some description
- */
- config.test = {
- key: appInfo.name + '_123456',
- };
- // 安全配置
- config.security = {
- csrf: {
- // ignoreJSON: true, // 默认为 false,当设置为 true 时,将会放过所有 content-type 为 `application/json` 的请求
- enable: false,
- },
- };
- config.onerror = ErrorConfig;
- config.errorMongo = {
- details: true,
- };
- config.errorHandler = {
- details: true,
- };
- config.accessLog = {
- enable: true,
- body: false,
- };
- return config;
- };
|