更新 node 依赖

This commit is contained in:
whyour
2024-12-12 00:26:11 +08:00
parent 026640a757
commit ab27a4c908
9 changed files with 5215 additions and 6179 deletions
+3 -3
View File
@@ -3,7 +3,7 @@ import bodyParser from 'body-parser';
import cors from 'cors';
import routes from '../api';
import config from '../config';
import jwt, { UnauthorizedError } from 'express-jwt';
import { UnauthorizedError, expressjwt } from 'express-jwt';
import fs from 'fs/promises';
import { getPlatform, getToken, safeJSONParse } from '../config/util';
import Container from 'typedi';
@@ -29,7 +29,7 @@ export default ({ app }: { app: Application }) => {
target: `http://0.0.0.0:${config.publicPort}/api`,
changeOrigin: true,
pathRewrite: { '/api/public': '' },
logProvider: () => Logger,
logger: Logger,
}),
);
@@ -37,7 +37,7 @@ export default ({ app }: { app: Application }) => {
app.use(bodyParser.urlencoded({ limit: '50mb', extended: true }));
app.use(
jwt({
expressjwt({
secret: config.secret,
algorithms: ['HS384'],
}).unless({