diff --git a/.changeset/puny-teeth-notice.md b/.changeset/puny-teeth-notice.md new file mode 100644 index 000000000000..643a22100bb6 --- /dev/null +++ b/.changeset/puny-teeth-notice.md @@ -0,0 +1,5 @@ +--- +"gradio": patch +--- + +fix:Fix `root` when user is unauthenticated so that login page appears correctly diff --git a/gradio/routes.py b/gradio/routes.py index 9f1deaabbbca..f826eda12e75 100644 --- a/gradio/routes.py +++ b/gradio/routes.py @@ -333,7 +333,7 @@ def main(request: fastapi.Request, user: str = Depends(get_current_user)): "auth_required": True, "auth_message": blocks.auth_message, "space_id": app.get_blocks().space_id, - "root": root_path, + "root": route_utils.strip_url(root_path), } try: