[PR #19163] [CLOSED] fix: generate discovery URLs with path prefix #112424

Closed
opened 2026-05-18 12:32:17 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/19163
Author: @xqqp
Created: 11/13/2025
Status: Closed

Base: devHead: patch-2


📝 Commits (1)

  • e9978b5 fix: generate discovery URLs with path prefix

📊 Changes

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

View changed files

📝 backend/open_webui/utils/oauth.py (+11 -0)

📄 Description

OAuth discovery URLs are generated based on the original OAuth URL: Two URLs are generated excluding any passed URL path and two URLs are generated with the original URL path as a postfix. With this PR two additional URLs are generated with the URL path as a prefix.

This fixes cases where a URL path is used as a proxy identifier (e.g. http://example.com/oauth_server).

Without this change http://example.com/.well-known/oauth-authorization-server and http://example.com/.well-known/oauth-authorization-server/oauth_server are queried.

With this change http://example.com/oauth_server/.well-known/oauth-authorization-server is checked as well.

Changelog Entry

Fixed

  • generate discovery URLs with path prefix

Contributor License Agreement

By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.


🔄 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/open-webui/open-webui/pull/19163 **Author:** [@xqqp](https://github.com/xqqp) **Created:** 11/13/2025 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `patch-2` --- ### 📝 Commits (1) - [`e9978b5`](https://github.com/open-webui/open-webui/commit/e9978b5c546804dd32ac265d26898919c51f0a9a) fix: generate discovery URLs with path prefix ### 📊 Changes **1 file changed** (+11 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/utils/oauth.py` (+11 -0) </details> ### 📄 Description OAuth discovery URLs are generated based on the original OAuth URL: Two URLs are generated excluding any passed URL path and two URLs are generated with the original URL path as a postfix. With this PR two additional URLs are generated with the URL path as a prefix. This fixes cases where a URL path is used as a proxy identifier (e.g. http://example.com/oauth_server). Without this change http://example.com/.well-known/oauth-authorization-server and http://example.com/.well-known/oauth-authorization-server/oauth_server are queried. With this change http://example.com/oauth_server/.well-known/oauth-authorization-server is checked as well. # Changelog Entry ### Fixed - generate discovery URLs with path prefix ### Contributor License Agreement By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](https://github.com/open-webui/open-webui/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms. --- <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-05-18 12:32:17 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#112424