From 005a5061a715691c8f24e8e7b523740e50277b67 Mon Sep 17 00:00:00 2001 From: th33xitus Date: Thu, 3 Feb 2022 16:57:55 +0100 Subject: [PATCH] chore: apply changes made in mainsailOS 0.6.1 --- resources/klipper_webui_nginx.cfg | 24 +++++++++++++++++++++++- resources/moonraker.conf | 15 +++++++-------- scripts/install_mjpg-streamer.sh | 4 ++-- 3 files changed, 32 insertions(+), 11 deletions(-) diff --git a/resources/klipper_webui_nginx.cfg b/resources/klipper_webui_nginx.cfg index 6501948..bd4fe85 100644 --- a/resources/klipper_webui_nginx.cfg +++ b/resources/klipper_webui_nginx.cfg @@ -14,7 +14,7 @@ server { gzip_comp_level 4; gzip_buffers 16 8k; gzip_http_version 1.1; - gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/json application/xml application/javascript; + gzip_types text/plain text/css text/xml text/javascript application/javascript application/x-javascript application/json application/xml; # web_path from <> static files root /home/pi/<>; @@ -49,6 +49,8 @@ server { location ~ ^/(printer|api|access|machine|server)/ { proxy_pass http://apiserver$request_uri; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; 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; @@ -56,18 +58,38 @@ server { } location /webcam/ { + postpone_output 0; + proxy_buffering off; + proxy_ignore_headers X-Accel-Buffering; + access_log off; + error_log off; proxy_pass http://mjpgstreamer1/; } location /webcam2/ { + postpone_output 0; + proxy_buffering off; + proxy_ignore_headers X-Accel-Buffering; + access_log off; + error_log off; proxy_pass http://mjpgstreamer2/; } location /webcam3/ { + postpone_output 0; + proxy_buffering off; + proxy_ignore_headers X-Accel-Buffering; + access_log off; + error_log off; proxy_pass http://mjpgstreamer3/; } location /webcam4/ { + postpone_output 0; + proxy_buffering off; + proxy_ignore_headers X-Accel-Buffering; + access_log off; + error_log off; proxy_pass http://mjpgstreamer4/; } } diff --git a/resources/moonraker.conf b/resources/moonraker.conf index 53a6cde..9b99cb7 100644 --- a/resources/moonraker.conf +++ b/resources/moonraker.conf @@ -18,10 +18,10 @@ trusted_clients: FE80::/10 ::1/128 cors_domains: - *.lan - *.local - *://my.mainsail.xyz - *://app.fluidd.xyz + http://*.lan + http://*.local + http://*://my.mainsail.xyz + http://*://app.fluidd.xyz [file_manager] config_path: %CFG% @@ -33,18 +33,17 @@ log_path: %LOG% [update_manager] channel: dev +refresh_interval: 168 [update_manager mainsail] -type: web_beta +type: web repo: mainsail-crew/mainsail path: ~/mainsail -refresh_interval: 24 [update_manager fluidd] -type: web_beta +type: web repo: fluidd-core/fluidd path: ~/fluidd -refresh_interval: 24 #[update_manager KlipperScreen] #type: git_repo diff --git a/scripts/install_mjpg-streamer.sh b/scripts/install_mjpg-streamer.sh index 4c1277c..bc52c43 100755 --- a/scripts/install_mjpg-streamer.sh +++ b/scripts/install_mjpg-streamer.sh @@ -90,9 +90,9 @@ EOT sudo /bin/sh -c "cat > /etc/logrotate.d/webcamd" << EOF /var/log/webcamd.log { - rotate 4 + rotate 2 weekly - maxsize 64M + maxsize 32M missingok notifempty compress