mirror of
https://github.com/open-webui/docs.git
synced 2026-03-26 13:18:42 +07:00
http2
This commit is contained in:
@@ -117,6 +117,20 @@ backend owui_chat
|
||||
http-request add-header X-CLIENT-IP %[src]
|
||||
http-request set-header X-Forwarded-Proto https if { ssl_fc }
|
||||
server chat <ip>:3000
|
||||
|
||||
## WebSocket and HTTP/2 Compatibility
|
||||
|
||||
Starting with recent versions (including HAProxy 3.x), HAProxy may enable HTTP/2 by default. While HTTP/2 supports WebSockets (RFC 8441), some clients or backend configurations may experience "freezes" or unresponsiveness when icons or data start loading via WebSockets over an H2 tunnel.
|
||||
|
||||
If you experience these issues:
|
||||
1. **Force HTTP/1.1 for WebSockets**: Add `option h2-workaround-bogus-websocket-clients` to your `frontend` or `defaults` section. This prevents HAProxy from advertising RFC 8441 support to the client, forcing a fallback to the more stable HTTP/1.1 Upgrade mechanism.
|
||||
2. **Backend Version**: Ensure your backend connection is using HTTP/1.1 (the default for `mode http`).
|
||||
|
||||
Example addition to your `defaults` or `frontend`:
|
||||
```shell
|
||||
defaults
|
||||
# ... other settings
|
||||
option h2-workaround-bogus-websocket-clients
|
||||
```
|
||||
|
||||
You will see that we have ACL records (routers) for both Open WebUI and Let's Encrypt. To use WebSocket with OWUI, you need to have an SSL configured, and the easiest way to do that is to use Let's Encrypt.
|
||||
|
||||
@@ -25,6 +25,17 @@ A very common and difficult-to-debug issue with WebSocket connections is a misco
|
||||
|
||||
Failure to do so will cause WebSocket connections to fail, even if you have enabled "Websockets support" in Nginx Proxy Manager.
|
||||
|
||||
### HTTP/2 and WebSockets
|
||||
|
||||
If you enable **HTTP/2** on your Nginx server, ensure that your proxy configuration still uses **HTTP/1.1** for the connection to the Open WebUI backend. This is crucial as most WebUI features (like streaming and real-time updates) rely on WebSockets, which are more stable when handled via HTTP/1.1 `Upgrade` than over the newer RFC 8441 (WebSockets over H2) in many proxy environments.
|
||||
|
||||
In your Nginx location block, always include:
|
||||
```nginx
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
Choose the method that best fits your deployment needs.
|
||||
|
||||
Reference in New Issue
Block a user