From a5160c8d4f17fd9baf66aabcc8c5535e4f471a3e Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 29 May 2019 15:37:05 +0200 Subject: l radio: add correct hostname headers --- lass/2configs/radio.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lass/2configs/radio.nix') diff --git a/lass/2configs/radio.nix b/lass/2configs/radio.nix index 88899c554..7960db564 100644 --- a/lass/2configs/radio.nix +++ b/lass/2configs/radio.nix @@ -97,7 +97,7 @@ in { services.icecast = { enable = true; - hostname = "config.krebs.build.host.name"; + hostname = "radio.lassul.us"; admin.password = admin-password; extraConf = '' @@ -218,6 +218,11 @@ in { forceSSL = true; enableACME = true; locations."/".extraConfig = '' + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Host $host; + proxy_set_header X-Forwarded-Server $host; + proxy_set_header X-Real-IP $remote_addr; proxy_pass http://localhost:8000; ''; locations."/recent".extraConfig = '' -- cgit v1.2.3 From 4c7f444c70c48b0230019d4b2e7f17519a4f3d1a Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 29 May 2019 15:38:23 +0200 Subject: l radio: secure radio mounts with password --- lass/2configs/radio.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'lass/2configs/radio.nix') diff --git a/lass/2configs/radio.nix b/lass/2configs/radio.nix index 7960db564..49d093a6d 100644 --- a/lass/2configs/radio.nix +++ b/lass/2configs/radio.nix @@ -100,9 +100,14 @@ in { hostname = "radio.lassul.us"; admin.password = admin-password; extraConf = '' - - ${source-password} - + + /radio.mp3 + ${source-password} + + + /radio.ogg + ${source-password} + ''; }; -- cgit v1.2.3 From 78a3cfb6fff1488437d22834709ffd04b287b819 Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 29 May 2019 15:39:56 +0200 Subject: l radio: fix Reaktor pattern --- lass/2configs/radio.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lass/2configs/radio.nix') diff --git a/lass/2configs/radio.nix b/lass/2configs/radio.nix index 49d093a6d..b4efd42fc 100644 --- a/lass/2configs/radio.nix +++ b/lass/2configs/radio.nix @@ -199,8 +199,8 @@ in { workdir = config.krebs.reaktor2.the_playlist.stateDir; hooks.PRIVMSG = [ { - activate = "match"; - pattern = ''!([^ ]+)(?:\s*(.*))?''; + #activate = "match"; + pattern = "^\\s*([0-9A-Za-z._][0-9A-Za-z._-]*)(?:\\s+(.*\\S))?\\s*$"; command = 1; arguments = [2]; commands = { -- cgit v1.2.3