ollama / ollama

Get up and running with Llama 3.1, Mistral, Gemma 2, and other large language models.
https://ollama.com
MIT License
88.3k stars 6.89k forks source link

Add a way for user to approve CORS requests from origins without running a separate `ollama serve` #433

Open jmorganca opened 1 year ago

jmorganca commented 1 year ago

Quite a few tools built on Ollama are hosted on alternate origins like chrome-extension:// (chrome extensions) or http://example.com (websites that want to use the user's local Ollama instance).

Tools like Figma, Zoom and Slack have a way to "allow" the browser clients to interact with a server hosted on localhost by prompting the user once to approve an origin and then remembering this decision. We would need to be careful with the form factor here, but a dialog window (similar to Apple's universal links) could be a helpful starting point.

f0rodo commented 1 year ago

Localhost does work btw. Just not chrome-extensions:// which honestly is probably a good privacy policy. Chrome extensions are notorious for data/privacy abuse. https://github.com/extesy/hoverzoom/discussions/670

Nols1000 commented 9 months ago

Hi I've added a PR that addresses this issue. It would be nice, if you could take a look and provide feedback.