From a5160c8d4f17fd9baf66aabcc8c5535e4f471a3e Mon Sep 17 00:00:00 2001
From: lassulus <lassulus@lassul.us>
Date: Wed, 29 May 2019 15:37:05 +0200
Subject: [PATCH] l radio: add correct hostname headers

---
 lass/2configs/radio.nix | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

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 = ''
       <authentication>
@@ -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 = ''