From 8bcf8156dbcbe0d4e6f1ab2b074bd59fb8ccc8c5 Mon Sep 17 00:00:00 2001 From: Jan-Henrik Bruhn Date: Fri, 10 Feb 2023 16:51:42 +0100 Subject: [PATCH] further nginx --- epaper-station/config.yaml | 2 +- epaper-station/rootfs/etc/nginx/nginx.conf | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/epaper-station/config.yaml b/epaper-station/config.yaml index 3238b95..b9dbd58 100644 --- a/epaper-station/config.yaml +++ b/epaper-station/config.yaml @@ -1,6 +1,6 @@ --- name: E-Paper Station -version: 1.0.0.45 +version: 1.0.0.46 #image: ghcr.io/maxwinterstein/homeassistant-addon-toogoodtogo-ha-mqtt-bridge-{arch} slug: epaper-station description: Publish images to E-Paper pricetags diff --git a/epaper-station/rootfs/etc/nginx/nginx.conf b/epaper-station/rootfs/etc/nginx/nginx.conf index ea5273e..26a3b90 100644 --- a/epaper-station/rootfs/etc/nginx/nginx.conf +++ b/epaper-station/rootfs/etc/nginx/nginx.conf @@ -22,13 +22,18 @@ http { allow 172.30.32.2; deny all; + set_by_lua $uri_lowercase "return string.lower(ngx.var.uri)"; + + location ~[A-Z] { + return 301 $scheme://$http_host$uri_lowercase$is_args$args; + } + location / { root /public; } location /input_img { - set_by_lua $endpath 'return ngx.arg[1]:lower()' $request_uri; - proxy_pass http://localhost:8080$endpath; + proxy_pass http://localhost:8080/; } location /ws {