123456789101112131415161718192021222324252627282930313233 |
- import { MidwayConfig } from '@midwayjs/core';
- export default {
- // use for cookie sign key, should change to your own and keep security
- keys: '1734594361174_9059',
- koa: {
- port: 7001,
- },
- /**上传设置, columns:涉及文件的字段:${表名}.${字段名} 表名用model的class名,因为在connect中存的就是这个类 */
- busboy: {
- mode: 'file',
- realdir: 'upload',
- whitelist: null,
- },
- jwt: {
- secret: 'Ziyouyanfa!@#',
- expiresIn: 3600, // 3600
- },
- /**启用checkToken中间件 */
- useCheckTokenMiddleware: true,
- /**不检查token的路由列表 */
- passToken: [
- '/login/:type',
- '/dictType',
- '/files/*',
- '/config',
- '/files/:project/upload',
- '/files/:project/:catalog/upload',
- '/files/:project/:catalog/:item/upload',
- ],
- /**请求头中token的key名 */
- tokenKey: 'token',
- } as MidwayConfig;
|