mirror of
https://github.com/open-webui/docs.git
synced 2025-12-12 07:29:49 +07:00
Update env-configuration.mdx
This commit is contained in:
@@ -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`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user