Update env-configuration.mdx

This commit is contained in:
Classic298
2025-11-12 18:26:59 +01:00
committed by GitHub
parent 3d40a8ab59
commit 3f165ca650

View File

@@ -1121,7 +1121,26 @@ Read more about `offline mode` in the [offline mode guide](/docs/tutorials/offli
- Type: `str`
- Default: `*`
- Description: Sets the allowed origins for Cross-Origin Resource Sharing (CORS).
- Description: Sets the allowed origins for Cross-Origin Resource Sharing (CORS). Smicolon ';' separated list of allowed origins.
:::warning
**This variable is required to be set**, otherwise you may experience Websocket issues and weird "{}" responses or "Unexpected token 'd', "data: {"id"... is not valid JSON".
:::
:::info
If you experience Websocket issues, check the logs of Open WebUI.
If you see lines like this `engineio.base_server:_log_error_once:354 - https://yourdomain.com is not an accepted origin.` then you need to configure your CORS_ALLOW_ORIGIN more broadly.
Example:
CORS_ALLOW_ORIGIN: "https://yourdomain.com;http://yourdomain.com;https://yourhostname;http://<your ip address>;http://localhost:3000"
Add all valid IPs, Domains and Hostnames one might access your Open WebUI to the variable.
Once you did, no more websocket issues or warnings in the console should occur.
:::
#### `CORS_ALLOW_CUSTOM_SCHEME`