[GH-ISSUE #3016] Request to http api from chrome extension not allowed in window #27613

Closed
opened 2026-04-22 05:05:30 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @DominguitoLamo on GitHub (Mar 9, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/3016

I got 403 while request ollama api in localhost from the background.js of chrome extension. It seems the problem caused by cors restriction. However, the source code of ollama indicate that the default config does allow browser extension requests ollama in localhost. Is it the problem of window version?

Originally created by @DominguitoLamo on GitHub (Mar 9, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/3016 I got 403 while request ollama api in localhost from the background.js of chrome extension. It seems the problem caused by cors restriction. However, the source code of ollama indicate that the default config does allow browser extension requests ollama in localhost. Is it the problem of window version?
Author
Owner

@jmorganca commented on GitHub (Mar 11, 2024):

Hi @DominguitoLamo chrome extensions can't access Ollama by default due to CORS, however OLLAMA_ORIGINS can be customized with chrome-extensions:// URLs by configuring the Ollama server: https://github.com/ollama/ollama/blob/main/docs/faq.md#how-do-i-configure-ollama-server

<!-- gh-comment-id:1989540765 --> @jmorganca commented on GitHub (Mar 11, 2024): Hi @DominguitoLamo chrome extensions can't access Ollama by default due to CORS, however `OLLAMA_ORIGINS` can be customized with `chrome-extensions://` URLs by configuring the Ollama server: https://github.com/ollama/ollama/blob/main/docs/faq.md#how-do-i-configure-ollama-server
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#27613