[PR #9313] [MERGED] server: allow vscode-file origins #12915

Closed
opened 2026-04-13 00:12:40 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/9313
Author: @eriestrisnadi
Created: 2/24/2025
Status: Merged
Merged: 2/27/2025
Merged by: @BruceMacD

Base: mainHead: vscode-origin


📝 Commits (1)

  • 5640af7 server: allow vscode-file origins

📊 Changes

2 files changed (+5 additions, -0 deletions)

View changed files

📝 envconfig/config.go (+1 -0)
📝 envconfig/config_test.go (+4 -0)

📄 Description

Overview

When using Cursor and trying to verify with Local Ollama service, requests to POST /v1/chat/completions fail with 403 Forbidden due to the Origin header using vscode-file://vscode-app which isn't currently whitelisted.

403 Forbidden Error

Suggested Fix

Add vscode-file://* to the allowed origins list in the OLLAMA_ORIGINS environment variable configuration.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/9313 **Author:** [@eriestrisnadi](https://github.com/eriestrisnadi) **Created:** 2/24/2025 **Status:** ✅ Merged **Merged:** 2/27/2025 **Merged by:** [@BruceMacD](https://github.com/BruceMacD) **Base:** `main` ← **Head:** `vscode-origin` --- ### 📝 Commits (1) - [`5640af7`](https://github.com/ollama/ollama/commit/5640af7bb367591fe8114e85582417846931ac4c) server: allow vscode-file origins ### 📊 Changes **2 files changed** (+5 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `envconfig/config.go` (+1 -0) 📝 `envconfig/config_test.go` (+4 -0) </details> ### 📄 Description ## Overview When using [Cursor](https://cursor.com) and trying to verify with Local Ollama service, requests to `POST /v1/chat/completions` fail with **403 Forbidden** due to the Origin header using `vscode-file://vscode-app` which isn't currently whitelisted. ![403 Forbidden Error](https://github.com/user-attachments/assets/2a5d4415-1dfd-44a8-b66c-05fff9a39392) ## Suggested Fix Add `vscode-file://*` to the allowed origins list in the `OLLAMA_ORIGINS` environment variable configuration. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-13 00:12:40 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#12915