From 3ca99ab6557409590d177ff24986e7ba529c93bb Mon Sep 17 00:00:00 2001 From: Nathan McCarty Date: Thu, 12 Oct 2023 13:13:41 -0400 Subject: [PATCH] jellyfin socket nginx --- machines/tounge/configuration.nix | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/machines/tounge/configuration.nix b/machines/tounge/configuration.nix index 3757838..58c4454 100644 --- a/machines/tounge/configuration.nix +++ b/machines/tounge/configuration.nix @@ -203,11 +203,26 @@ "jellyfin.mccarty.io" = { forceSSL = true; useACMEHost = "mccarty.io"; - locations."/" = { - proxyPass = "http://100.104.25.128:8096"; - extraConfig = '' - allow all; - ''; + locations = { + "/socket" = { + proxyPass = "http://100.104.25.128:8096"; + extraConfig = '' + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Forwarded-Protocol $scheme; + proxy_set_header X-Forwarded-Host $http_host; + ''; + }; + "/" = { + proxyPass = "http://100.104.25.128:8096"; + extraConfig = '' + allow all; + ''; + }; }; }; "jellyseerr.mccarty.io" = {