From 9253338555a10d3e09f00ff6dc4d0bad95b990e3 Mon Sep 17 00:00:00 2001 From: Random936 Date: Sun, 4 May 2025 14:58:50 -0700 Subject: [PATCH] Websocket support for open-webui --- config/ai.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/config/ai.nix b/config/ai.nix index 038c892..feea890 100644 --- a/config/ai.nix +++ b/config/ai.nix @@ -51,8 +51,19 @@ ''; locations."/".extraConfig = '' - proxy_buffering off; proxy_pass http://localhost:8080/; + + # Add WebSocket support (Necessary for version 0.5.0 and up) + proxy_http_version 1.1; + 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_buffering off; ''; }; };