From edf150735991553bbdf2baa8ede35d4eecbc58a3 Mon Sep 17 00:00:00 2001 From: Stefan Dej Date: Mon, 18 Jan 2021 23:27:20 +0100 Subject: [PATCH] bugfix: fix nginx config bugfix: disable upload limit in nginx config bugfix: disable cache for index.html Signed-off-by: Stefan Dej --- docs/setup-guide/manual-setup/mainsail.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/setup-guide/manual-setup/mainsail.md b/docs/setup-guide/manual-setup/mainsail.md index 72fc1856..fb66a372 100644 --- a/docs/setup-guide/manual-setup/mainsail.md +++ b/docs/setup-guide/manual-setup/mainsail.md @@ -86,12 +86,16 @@ server { index index.html; server_name _; - #max upload size for gcodes - client_max_body_size 200M; + #disable max upload size + client_max_body_size 0; location / { try_files $uri $uri/ /index.html; } + + location = /index.html { + add_header Cache-Control "no-store, no-cache, must-revalidate"; + } location /websocket { proxy_pass http://apiserver/websocket; @@ -104,8 +108,8 @@ server { proxy_read_timeout 86400; } - location ~ ^/(printer|api|access|machine|server)$ { - proxy_pass http://apiserver/$1; + location ~ ^/(printer|api|access|machine|server)/ { + proxy_pass http://apiserver$request_uri; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;