fix: raise nginx client_max_body_size to 64M for large firmware uploads
Default nginx limit is 1MB — merged.bin (16MB+) was rejected with 413 HTML response, causing JSON parse error in the frontend. Added proxy_read_timeout 120s for slow upload connections. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -5,6 +5,9 @@ server {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
# 업로드 크기 제한 (merged.bin 등 대용량 펌웨어 허용)
|
||||
client_max_body_size 64M;
|
||||
|
||||
# 정적 파일 서빙
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
@@ -12,16 +15,17 @@ server {
|
||||
|
||||
# 백엔드 API 프록시
|
||||
location /api/ {
|
||||
proxy_pass http://backend:3000/api/;
|
||||
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 $scheme;
|
||||
proxy_pass http://backend:3000/api/;
|
||||
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 $scheme;
|
||||
proxy_read_timeout 120s;
|
||||
}
|
||||
|
||||
# 펌웨어 파일 프록시
|
||||
location /firmware/ {
|
||||
proxy_pass http://backend:3000/firmware/;
|
||||
proxy_pass http://backend:3000/firmware/;
|
||||
proxy_set_header Host $host;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user