docs: Strengthen CORS warnings for WebSocket connections

This commit strengthens the warnings in the Redis and Nginx Proxy Manager documentation regarding the `C-S_ALLOW_ORIGIN` environment variable.

- Replaced the `:::tip` block with a more prominent `:::danger` block in both files.
- Clarified that a misconfigured `CORS_ALLOW_ORIGIN` is a common and difficult-to-debug cause of WebSocket connection failures, especially in production or reverse-proxied setups.
- Emphasized that this step is critical and should not be skipped.
This commit is contained in:
silentoplayz
2025-11-10 02:00:13 -05:00
parent be276c25a5
commit dcf6337614
2 changed files with 51 additions and 4 deletions

View File

@@ -71,6 +71,23 @@ docker-compose up -d
- Set the scheme to HTTP (default), enable ``Websockets support`` and point to your Docker IP (if docker with open-webui is running on the same computer as NGINX manager, this will be the same IP as earlier (example: ``192.168.0.6``)
- Select the SSL certificate generated earlier, force SSL, and enable HTTP/2.
:::danger Critical: Configure CORS for WebSocket Connections
A very common and difficult-to-debug issue with WebSocket connections is a misconfigured Cross-Origin Resource Sharing (CORS) policy. When running Open WebUI behind a reverse proxy like Nginx Proxy Manager, you **must** set the `CORS_ALLOW_ORIGIN` environment variable in your Open WebUI configuration.
Failure to do so will cause WebSocket connections to fail, even if you have enabled "Websockets support" in Nginx Proxy Manager.
**Example:**
If you access your UI at `https://openwebui.hello.duckdns.org`, you must set:
```bash
CORS_ALLOW_ORIGIN="https://openwebui.hello.duckdns.org"
```
You can also provide a comma-separated list of allowed domains. **Do not skip this step.**
:::
6. **Add your url to open-webui (otherwise getting HTTPS error):**
- Go to your open-webui → Admin Panel → Settings → General