Increase nginx client_max_body_size to 100m for image uploads
Build & Deploy / build-and-deploy (push) Successful in 27s
Build & Deploy / build-and-deploy (push) Successful in 27s
Default 1MB limit caused 413 errors for raw images (14MB+). Also add proxy_read_timeout for large uploads. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -4,6 +4,9 @@ server {
|
|||||||
root /usr/share/nginx/html;
|
root /usr/share/nginx/html;
|
||||||
index index.html;
|
index index.html;
|
||||||
|
|
||||||
|
# Tillat store bildeopplastinger (råbilder kan være 20MB+)
|
||||||
|
client_max_body_size 100m;
|
||||||
|
|
||||||
# SPA: alle ruter går til index.html
|
# SPA: alle ruter går til index.html
|
||||||
location / {
|
location / {
|
||||||
try_files $uri $uri/ /index.html;
|
try_files $uri $uri/ /index.html;
|
||||||
@@ -14,5 +17,6 @@ server {
|
|||||||
proxy_pass http://backend:8000;
|
proxy_pass http://backend:8000;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_read_timeout 120s;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user