mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-04 03:16:03 -05:00
refac
This commit is contained in:
@@ -266,11 +266,11 @@ async def get_authorization_server_discovery_urls(server_url: str) -> list[str]:
|
||||
) as response:
|
||||
if response.status == 401:
|
||||
match = re.search(
|
||||
r'resource_metadata="([^"]+)"',
|
||||
r'resource_metadata=(?:"([^"]+)"|([^\s,]+))',
|
||||
response.headers.get('WWW-Authenticate', ''),
|
||||
)
|
||||
if match:
|
||||
resource_metadata_url = match.group(1)
|
||||
resource_metadata_url = match.group(1) or match.group(2)
|
||||
log.debug(f'Found resource_metadata URL: {resource_metadata_url}')
|
||||
|
||||
# Step 2: Fetch Protected Resource metadata
|
||||
|
||||
Reference in New Issue
Block a user