From ccbd9c21d0a6c23cac2747cd9982c762f5a6733f Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 29 Feb 2024 02:31:54 +0300 Subject: [PATCH] grafana forward --- hosts/intelnuc/configuration.nix | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/hosts/intelnuc/configuration.nix b/hosts/intelnuc/configuration.nix index 665eeff..4ebf693 100644 --- a/hosts/intelnuc/configuration.nix +++ b/hosts/intelnuc/configuration.nix @@ -70,8 +70,15 @@ proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_pass http://123.123.123.123:3000; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; + + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + ''; + locations."/api/live/ws".extraConfig = '' + proxy_pass http://123.123.123.123:3000; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; ''; }; services.nginx.virtualHosts."grafana_second" = { @@ -81,8 +88,15 @@ proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_pass http://123.123.123.123:3000; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; + + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + ''; + locations."/api/live/ws".extraConfig = '' + proxy_pass http://123.123.123.123:3000; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; ''; };