fix(nginx配置): 增加全局请求体大小限制并统一为100M
为了支持大文件上传,在nginx配置中增加全局的client_max_body_size设置,并将原有的局部限制从50M提升至100M以保持统一
This commit is contained in:
+4
-1
@@ -1624,6 +1624,9 @@ function generateNginxConfig() {
|
||||
const nginxConfig = `# IDC设备管理系统 - Nginx配置
|
||||
# 生成时间: ${new Date().toISOString()}
|
||||
|
||||
# 全局请求体大小限制(支持大文件上传)
|
||||
client_max_body_size 100M;
|
||||
|
||||
server {
|
||||
listen ${config.frontendPort};
|
||||
server_name ${config.domain};
|
||||
@@ -1668,7 +1671,7 @@ server {
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
client_max_body_size 50M; # 最大上传文件大小
|
||||
client_max_body_size 100M;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user