Documentation

Bypassing Intrinsic Browser Constraints (CORS)

Modern browsers block web applications from spontaneously polling local desktop ports (127.0.0.1). Heres how to authorize local AI Daemons.

The Cross-Origin Reality

When a web tab running `https://duplex.ai` attempts to fetch data from `http://localhost:11434` (Ollama), the Google Chrome sandbox will natively reject it citing CORS limitations (Cross-Origin Resource Sharing). This is a vital security feature protecting you from malicious websites port-scanning your machine, but fundamentally blocks local AI inference.

"Without explicit permission from the native process via "Access-Control-Allow-Origin: *", web applications cannot access native TCP bindings."

— W3C Browser Security Guidelines

Environmental Authorizations

To correct this, you must launch the Ollama Daemon with specific OS-level flags authorizing the local listener.

Mac OS / Linux Terminal Run
OLLAMA_ORIGINS="*" ollama serve

For macOS operating under `launchd`, ensure that you edit your plist file with the exact environmental mapping. Windows users must configure the global system variables through their System Properties pane prior to initializing the systray application.