Browse Source

fix: Trailing slash was never removed from request.base_url because it's not a string but rather a starlette.datastructures.URL

Jason Kidd 2 weeks ago
parent
commit
fced3efd98
1 changed files with 1 additions and 1 deletions
  1. 1 1
      backend/open_webui/utils/oauth.py

+ 1 - 1
backend/open_webui/utils/oauth.py

@@ -537,7 +537,7 @@ class OAuthManager:
             )
         # Redirect back to the frontend with the JWT token
 
-        redirect_base_url = request.app.state.config.WEBUI_URL or request.base_url
+        redirect_base_url = str(request.app.state.config.WEBUI_URL or request.base_url)
         if isinstance(redirect_base_url, str) and redirect_base_url.endswith("/"):
             redirect_base_url = redirect_base_url[:-1]
         redirect_url = f"{redirect_base_url}/auth#token={jwt_token}"