From bbfdb8c9563ed7bca536a0aeea92071852daa008 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Sun, 8 Oct 2023 22:49:04 +0400 Subject: [PATCH] In nginx.conf added allow 127.0.0.1. Also found out a proxy_bind option. With it Icecast will see client's IP. --- configs/nginx.conf | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/configs/nginx.conf b/configs/nginx.conf index 82761aa..7b65a62 100644 --- a/configs/nginx.conf +++ b/configs/nginx.conf @@ -27,6 +27,7 @@ server { location /live/ { proxy_pass http://127.0.0.1:8001/; + proxy_bind $remote_addr transparent; proxy_buffering off; proxy_set_header X-Real-IP $remote_addr; } @@ -36,11 +37,13 @@ server { } location /api/listener { + allow 127.0.0.1; allow 192.168.144.2; deny all; } location /api/playlist { + allow 127.0.0.1; allow 192.168.144.2; deny all; } @@ -61,8 +64,9 @@ server { location / { - proxy_pass http://127.0.0.1:8001/; - proxy_buffering off; + proxy_pass http://127.0.0.1:8001/; + proxy_bind $remote_addr transparent; + proxy_buffering off; proxy_set_header X-Real-IP $remote_addr; }