[GH-ISSUE #13001] CORS Error #34368

Closed
opened 2026-04-22 17:51:28 -05:00 by GiteaMirror · 6 comments
Owner

Originally created by @EliasPereirah on GitHub (Nov 7, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/13001

What is the issue?

Even after editing systemctl edit ollama.service and adding:
Environment="OLLAMA_ORIGINS=https://eliaspereirah.github.io"
this page is unable to request localhost and list local models or perform any other action.
I noticed that the instructions at https://github.com/ollama/ollama/blob/main/docs/faq.md#how-can-i-allow-additional-web-origins-to-access-ollama have been removed. So has something changed, or is this a bug?

Relevant log output


OS

No response

GPU

No response

CPU

No response

Ollama version

No response

Originally created by @EliasPereirah on GitHub (Nov 7, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/13001 ### What is the issue? Even after editing `systemctl edit ollama.service` and adding: `Environment="OLLAMA_ORIGINS=https://eliaspereirah.github.io"` this [page ](https://eliaspereirah.github.io/OrionChat/) is unable to request localhost and list local models or perform any other action. I noticed that the instructions at https://github.com/ollama/ollama/blob/main/docs/faq.md#how-can-i-allow-additional-web-origins-to-access-ollama have been removed. So has something changed, or is this a bug? ### Relevant log output ```shell ``` ### OS _No response_ ### GPU _No response_ ### CPU _No response_ ### Ollama version _No response_
GiteaMirror added the bug label 2026-04-22 17:51:28 -05:00
Author
Owner

@rick-github commented on GitHub (Nov 7, 2025):

The documentation has reorganized and the instructions can now be found at https://github.com/ollama/ollama/blob/main/docs/faq.mdx#how-can-i-allow-additional-web-origins-to-access-ollama.

<!-- gh-comment-id:3503125464 --> @rick-github commented on GitHub (Nov 7, 2025): The documentation has reorganized and the instructions can now be found at https://github.com/ollama/ollama/blob/main/docs/faq.mdx#how-can-i-allow-additional-web-origins-to-access-ollama.
Author
Owner

@EliasPereirah commented on GitHub (Nov 7, 2025):

Thanks for the new documentation link. There still seems to be a bug, as I'm having problems with CORS even after following the suggested settings.

<!-- gh-comment-id:3505144930 --> @EliasPereirah commented on GitHub (Nov 7, 2025): Thanks for the new documentation link. There still seems to be a bug, as I'm having problems with CORS even after following the suggested settings.
Author
Owner

@rick-github commented on GitHub (Nov 7, 2025):

It works for me. I ran

OLLAMA_ORIGINS=https://eliaspereirah.github.io ollama serve

And then visited the page. Models were fetched, and after selecting a model and sending a prompt, I got a response:

Image




What's the output of systemctl cat ollama?

<!-- gh-comment-id:3505262138 --> @rick-github commented on GitHub (Nov 7, 2025): It works for me. I ran ``` OLLAMA_ORIGINS=https://eliaspereirah.github.io ollama serve ``` And then visited the page. Models were fetched, and after selecting a model and sending a prompt, I got a response: <img width="751" height="450" alt="Image" src="https://github.com/user-attachments/assets/875ba1d8-5ce1-45d7-8ef1-d8faf675aba8" /> <br/><br/> What's the output of `systemctl cat ollama`?
Author
Owner

@EliasPereirah commented on GitHub (Nov 8, 2025):

The output from: systemctl cat ollama is :

# /etc/systemd/system/ollama.service
[Unit]
Description=Ollama Service
After=network-online.target

[Service]
ExecStart=/usr/local/bin/ollama serve
User=ollama
Group=ollama
Restart=always
RestartSec=3
Environment="PATH=/home/solaris/.nvm/versions/node/v25.0.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:>

[Install]
WantedBy=default.target

# /etc/systemd/system/ollama.service.d/override.conf
[Service]
Environment="OLLAMA_ORIGINS=https://eliaspereirah.github.io"
<!-- gh-comment-id:3506261834 --> @EliasPereirah commented on GitHub (Nov 8, 2025): The output from: `systemctl cat ollama` is : ``` # /etc/systemd/system/ollama.service [Unit] Description=Ollama Service After=network-online.target [Service] ExecStart=/usr/local/bin/ollama serve User=ollama Group=ollama Restart=always RestartSec=3 Environment="PATH=/home/solaris/.nvm/versions/node/v25.0.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:> [Install] WantedBy=default.target # /etc/systemd/system/ollama.service.d/override.conf [Service] Environment="OLLAMA_ORIGINS=https://eliaspereirah.github.io" ```
Author
Owner

@rick-github commented on GitHub (Nov 8, 2025):

On your server, what's the output of tcpflow -c -i any port 11434 when you use the page?

<!-- gh-comment-id:3506713947 --> @rick-github commented on GitHub (Nov 8, 2025): On your server, what's the output of `tcpflow -c -i any port 11434` when you use the page?
Author
Owner

@EliasPereirah commented on GitHub (Nov 8, 2025):

Thank you very much frob, I ended up finding the solution, I just had to grant permission to access the local network in Chrome.

Image

https://developer.chrome.com/blog/local-network-access

<!-- gh-comment-id:3507003537 --> @EliasPereirah commented on GitHub (Nov 8, 2025): Thank you very much frob, I ended up finding the solution, I just had to grant permission to access the local network in Chrome. <img width="660" height="673" alt="Image" src="https://github.com/user-attachments/assets/0864b66e-f29b-4789-8ecf-844d77c3b1ad" /> https://developer.chrome.com/blog/local-network-access
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#34368