Skip to content

Commit 74b44fd

Browse files
authored
docs: Add OLLAMA_ORIGINS for browser extension support (ollama#9643)
1 parent 543240f commit 74b44fd

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

docs/faq.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,13 @@ cloudflared tunnel --url http://localhost:11434 --http-host-header="localhost:11
187187

188188
Ollama allows cross-origin requests from `127.0.0.1` and `0.0.0.0` by default. Additional origins can be configured with `OLLAMA_ORIGINS`.
189189

190+
For browser extensions, you'll need to explicitly allow the extension's origin pattern. Set `OLLAMA_ORIGINS` to include `chrome-extension://*`, `moz-extension://*`, and `safari-web-extension://*` if you wish to allow all browser extensions access, or specific extensions as needed:
191+
192+
```
193+
# Allow all Chrome, Firefox, and Safari extensions
194+
OLLAMA_ORIGINS=chrome-extension://*,moz-extension://*,safari-web-extension://* ollama serve
195+
```
196+
190197
Refer to the section [above](#how-do-i-configure-ollama-server) for how to set environment variables on your platform.
191198

192199
## Where are models stored?

0 commit comments

Comments
 (0)