Fix Ollama CORS Errors on Mac: One Environment Variable

You pointed a web app at localhost:11434 and got nothing back. The browser console shows a CORS policy error. Ollama blocked your request on purpose. The fix is one environment variable. The fix launchctl setenv OLLAMA_ORIGINS "*" && pkill Ollama; open -a Ollama Sets OLLAMA_ORIGINS and restarts Ollama. Works in about five seconds. This doesn't persist across reboots. For a permanent fix, add to ~/.zshrc: export OLLAMA_ORIGINS="*" To scope it to specific or...

Original Source

Read the full article at Dev →

KhanList aggregates and links to publicly available news content. We do not host full articles from third-party sources. Always verify important information with original sources.