增加文件保存限制,增加接口错误提醒

This commit is contained in:
whyour
2021-03-28 23:36:01 +08:00
parent b8e3a451c3
commit b10e77dce6
3 changed files with 8 additions and 5 deletions
+2 -2
View File
@@ -10,8 +10,8 @@ export default ({ app }: { app: Application }) => {
app.enable('trust proxy');
app.use(cors());
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: true }));
app.use(bodyParser.json({ limit: '50mb' }));
app.use(bodyParser.urlencoded({ limit: '50mb', extended: true }));
app.use(
jwt({ secret: config.secret as string, algorithms: ['HS384'] }).unless({
path: ['/api/login'],