From 66abb15a03306a9b40b5491a76a2b8ca4f2ea006 Mon Sep 17 00:00:00 2001 From: Fredrik Baberg Date: Tue, 27 Sep 2022 00:32:21 +0200 Subject: [PATCH] Update nginx; add vim --- 3dprinter-octoprint/Dockerfile | 2 ++ 3dprinter-octoprint/config.yaml | 2 +- 3dprinter-octoprint/rootfs/etc/nginx/nginx.conf | 3 ++- 3dprinter-octoprint/rootfs/etc/nginx/templates/ingress.gtpl | 6 +++--- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/3dprinter-octoprint/Dockerfile b/3dprinter-octoprint/Dockerfile index 038f337..b820093 100644 --- a/3dprinter-octoprint/Dockerfile +++ b/3dprinter-octoprint/Dockerfile @@ -24,6 +24,8 @@ RUN apt update && \ # dfu-util \ # dfu-programmer \ # stm32flash \ + # Development/testing + vim \ && \ apt clean diff --git a/3dprinter-octoprint/config.yaml b/3dprinter-octoprint/config.yaml index 5c49d6e..6981ea3 100644 --- a/3dprinter-octoprint/config.yaml +++ b/3dprinter-octoprint/config.yaml @@ -1,5 +1,5 @@ name: "3DPrinter-OctoPrint" -version: "2022.9.007" +version: "2022.9.008" slug: "3dprinter-octoprint" description: "OctoPrint as an addon, no additional bells and whistles." url: "https://github.com/fredrikbaberg/home-assistant-addons/tree/main/3dprinter-octoprint" diff --git a/3dprinter-octoprint/rootfs/etc/nginx/nginx.conf b/3dprinter-octoprint/rootfs/etc/nginx/nginx.conf index e496e8b..b8edbbb 100644 --- a/3dprinter-octoprint/rootfs/etc/nginx/nginx.conf +++ b/3dprinter-octoprint/rootfs/etc/nginx/nginx.conf @@ -14,7 +14,8 @@ worker_processes 1; pcre_jit on; # Write error log to the add-on log. -error_log /proc/1/fd/1 error; +# error_log /proc/1/fd/1 error; +error_log /var/log/nginx/error.log debug; # Max num of simultaneous connections by a worker process. events { diff --git a/3dprinter-octoprint/rootfs/etc/nginx/templates/ingress.gtpl b/3dprinter-octoprint/rootfs/etc/nginx/templates/ingress.gtpl index fd5463c..d85e845 100644 --- a/3dprinter-octoprint/rootfs/etc/nginx/templates/ingress.gtpl +++ b/3dprinter-octoprint/rootfs/etc/nginx/templates/ingress.gtpl @@ -11,12 +11,12 @@ server { proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For 172.30.32.2; # Intentional, for autologin. - proxy_set_header X-Forwarded-Host $http_host; - proxy_set_header X-Scheme $scheme; + proxy_set_header X-Forwarded-Host $host; + proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Script-Name {{ .ingress_entry }}; proxy_http_version 1.1; - client_max_body_size 0; }