From be8556af549818161bab8e4b0986de223cc8c0ad Mon Sep 17 00:00:00 2001 From: Filippo Berto Date: Mon, 19 Dec 2022 23:45:42 +0100 Subject: [PATCH] Better proxy --- baldur/configuration.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/baldur/configuration.nix b/baldur/configuration.nix index d5b6936..75008c6 100644 --- a/baldur/configuration.nix +++ b/baldur/configuration.nix @@ -58,7 +58,15 @@ with lib; { virtualHosts = let ssl = { enableACME = true; forceSSL = true; }; in { "unimi.bertof.net" = ssl // { locations."/".extraConfig = "rewrite ^/(.*)$ https://homes.di.unimi.it/berto/$1 redirect ;"; }; - "home-assistant.bertof.net" = ssl // { locations."/".proxyPass = "http://loki.local:8123/"; }; + "home-assistant.bertof.net" = ssl // { + locations."/" = { + proxyPass = "http://loki.local:8123/"; + proxyWebsockets = true; + }; + extraConfig = '' + proxy_pass_header Authorization; + ''; + }; }; }; openssh = { enable = true; openFirewall = true; };