[PR #5609] Return 405 for Unsupported Methods on Endpoints, 204 for Cross-Origin OPTIONS #58544

Open
opened 2026-04-29 13:25:57 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/5609
Author: @royjhan
Created: 7/10/2024
Status: 🔄 Open

Base: mainHead: royh/ep-methods


📝 Commits (2)

  • b84a54b return 405 for bad method
  • 781585d return 204 for cross-origin OPTIONS

📊 Changes

1 file changed (+6 additions, -0 deletions)

View changed files

📝 server/routes.go (+6 -0)

📄 Description

Resolves #5483
Previously curl -X POST http://localhost:11434/api/ps --> 404 (corrected to 405)

Resolves #5294
Previously, curl -X OPTIONS http://localhost:11434/api/chat --> 204
curl -X OPTIONS http://127.0.0.1:11434/api/chat --> 404 (corrected to 204)


🔄 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/5609 **Author:** [@royjhan](https://github.com/royjhan) **Created:** 7/10/2024 **Status:** 🔄 Open **Base:** `main` ← **Head:** `royh/ep-methods` --- ### 📝 Commits (2) - [`b84a54b`](https://github.com/ollama/ollama/commit/b84a54be055c3e732800e59e4147f5b9d705ef70) return 405 for bad method - [`781585d`](https://github.com/ollama/ollama/commit/781585d9bd3816c52c9319a8fff45bc7a6863e46) return 204 for cross-origin OPTIONS ### 📊 Changes **1 file changed** (+6 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `server/routes.go` (+6 -0) </details> ### 📄 Description Resolves #5483 Previously `curl -X POST http://localhost:11434/api/ps` --> 404 (corrected to 405) Resolves #5294 Previously, `curl -X OPTIONS http://localhost:11434/api/chat` --> 204 `curl -X OPTIONS http://127.0.0.1:11434/api/chat` --> 404 (corrected to 204) --- <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-29 13:25:57 -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#58544