diff --git a/server.js b/server.js index 85168ab..01236fe 100644 --- a/server.js +++ b/server.js @@ -408,7 +408,7 @@ const app = express(); // and the "secure" cookie flag can't tell the request was HTTPS. app.set('trust proxy', 1); -app.use(express.json({ limit: '10mb' })); +app.use(express.json({ limit: '30mb' })); // 模板里的 HTML 片段可能嵌了图片,整份模板数据会比较大;Nginx 的 client_max_body_size 也要 ≥ 这个值 app.use(session({ secret: crypto.randomBytes(32).toString('hex'), resave: false,