text: /* eslint valid-jsdoc: "off" */
  
  'use strict';
  
  /**
   * @param {Egg.EggAppInfo} appInfo app info
   */
  module.exports = appInfo => {
    /**
     * built-in config
     * @type {Egg.EggAppConfig}
     **/
    const config = {};
  
    config.security = {
      csrf: {
        enable: false,
        ignoreJSON: true, // 默认为 false，当设置为 true 时，将会放过所有 content-type 为 `application/json` 的请求
      },
      domainWhiteList: '*',
    };
  
    config.login = {
      secretKey: '9PE31Ju1La0KFM15vVc2uybgyJfVVkbq', // jwt密钥
      expires: 60 * 60 * 24, // 超时时间24小时
    };
  
    config.cors = {
      origin: '*',
      allowMethods: 'GET,HEAD,PUT,POST,DELETE,PATCH,OPTIONS',
      credentials: true,
    };
  
    // use for cookie sign key, should change to your own and keep security
    config.keys = appInfo.name + '_1555314751737_8431';
  
    // add your middleware config here
    config.middleware = ['formatMessage'];
  
    // add your user config here
    const userConfig = {
      // myAppName: 'egg',
    };
  
    return {
      ...config,
      ...userConfig,
    };
  };
  