diff --git a/frontend/favicon.ico b/frontend/favicon.ico new file mode 100644 index 0000000..f1c3b4f Binary files /dev/null and b/frontend/favicon.ico differ diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 2b9ddd4..11c939d 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -2,6 +2,9 @@ server { listen 80; server_name localhost; + # 设置最大上传文件大小为10GB + client_max_body_size 10G; + # 前端静态文件 location / { root /usr/share/nginx/html; @@ -18,9 +21,14 @@ server { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - # 使用上游传递的协议,如果没有则使用当前协议 - proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto; + # 修复:使用当前请求协议(http或https),适用于直接IP访问 + proxy_set_header X-Forwarded-Proto $scheme; proxy_cache_bypass $http_upgrade; + + # 增加超时时间支持大文件上传 + proxy_connect_timeout 300; + proxy_send_timeout 300; + proxy_read_timeout 300; } # 分享链接重定向 @@ -29,6 +37,7 @@ server { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto; + # 修复:使用当前请求协议(http或https),适用于直接IP访问 + proxy_set_header X-Forwarded-Proto $scheme; } }