[PR #1357] [CLOSED] Adding Cross-Origin Support for Web Apps #36433

Closed
opened 2026-04-22 21:05:30 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/1357
Author: @Nols1000
Created: 12/3/2023
Status: Closed

Base: mainHead: feature/request-allow-origin


📝 Commits (6)

  • 6425c49 Add endpoints to manage authorized origins to allow third party web applications to request access
  • f9b7bf2 Add option to block authorization requests improve handling of already authorized origins
  • 23b77bd Add documentation for the new authorization endpoints
  • 72d83f1 Fix preflight requests failing
  • 55f111f Merge remote-tracking branch 'origin/main' into feature/request-allow-origin
  • 1177cad Merge remote-tracking branch 'origin/main' into feature/request-allow-origin

📊 Changes

6 files changed (+293 additions, -9 deletions)

View changed files

📝 api/types.go (+5 -0)
📝 docs/api.md (+121 -0)
📝 go.mod (+6 -0)
📝 go.sum (+38 -0)
📝 llm/llama.cpp/gguf (+1 -1)
📝 server/routes.go (+122 -8)

📄 Description

This pull request introduces a new feature that allows users to grant cross-origin access to web applications. This will allow easier setup for web applications that would like to access the local Ollama API.

Changes Made:

  • Added an endpoint that allows web applications to request using the local Ollama API
    • The user is prompted for consent
  • Added an endpoint to view all authorizations
  • Added an endpoint to revoke an authorization
  • Updated documentation to provide clear instructions on configuring cross-origin access for web applications.

Address: #433 #300

Screenshot:
OpenSuse - Gnome (Linux):
Screenshot from 2023-12-03 03-38-10

MacOS:
image


🔄 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/1357 **Author:** [@Nols1000](https://github.com/Nols1000) **Created:** 12/3/2023 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feature/request-allow-origin` --- ### 📝 Commits (6) - [`6425c49`](https://github.com/ollama/ollama/commit/6425c49276df731f8f52a4891cda64b0a3bd3036) Add endpoints to manage authorized origins to allow third party web applications to request access - [`f9b7bf2`](https://github.com/ollama/ollama/commit/f9b7bf29780eaef408129941a7cd8f9af25c4656) Add option to block authorization requests improve handling of already authorized origins - [`23b77bd`](https://github.com/ollama/ollama/commit/23b77bde71ae1ad2be477abb50366786d7f9edec) Add documentation for the new authorization endpoints - [`72d83f1`](https://github.com/ollama/ollama/commit/72d83f15ea9d1f26caf975f1d180d3e58442b60d) Fix preflight requests failing - [`55f111f`](https://github.com/ollama/ollama/commit/55f111f5c781a32260346668a77bcf18698f0293) Merge remote-tracking branch 'origin/main' into feature/request-allow-origin - [`1177cad`](https://github.com/ollama/ollama/commit/1177cad143e863e665a7e42b6ea13749470d30ba) Merge remote-tracking branch 'origin/main' into feature/request-allow-origin ### 📊 Changes **6 files changed** (+293 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `api/types.go` (+5 -0) 📝 `docs/api.md` (+121 -0) 📝 `go.mod` (+6 -0) 📝 `go.sum` (+38 -0) 📝 `llm/llama.cpp/gguf` (+1 -1) 📝 `server/routes.go` (+122 -8) </details> ### 📄 Description This pull request introduces a new feature that allows users to grant cross-origin access to web applications. This will allow easier setup for web applications that would like to access the local Ollama API. Changes Made: - Added an endpoint that allows web applications to request using the local Ollama API - The user is prompted for consent - Added an endpoint to view all authorizations - Added an endpoint to revoke an authorization - Updated documentation to provide clear instructions on configuring cross-origin access for web applications. Address: #433 #300 Screenshot: OpenSuse - Gnome (Linux): ![Screenshot from 2023-12-03 03-38-10](https://github.com/jmorganca/ollama/assets/2102243/a3b19a3b-3441-4931-9a41-3c8d7d2b561c) MacOS: <img width="954" alt="image" src="https://github.com/jmorganca/ollama/assets/2102243/910ea876-8bd5-45c9-9fcd-9ae81e90b232"> --- <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-22 21:05:30 -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#36433