Update server.js via upload script - 2026-11-04 09:41:38

This commit is contained in:
mike 2026-11-04 09:41:43 +08:00
parent 17d1b41c82
commit ebe8af0f8f
1 changed files with 1 additions and 1 deletions

View File

@ -408,7 +408,7 @@ const app = express();
// and the "secure" cookie flag can't tell the request was HTTPS. // and the "secure" cookie flag can't tell the request was HTTPS.
app.set('trust proxy', 1); 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({ app.use(session({
secret: crypto.randomBytes(32).toString('hex'), secret: crypto.randomBytes(32).toString('hex'),
resave: false, resave: false,