Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logout redirecting to URL("/") does not redirect to login page when root_path is set to non-default #10291

Open
1 task done
ktanff opened this issue Jan 5, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@ktanff
Copy link

ktanff commented Jan 5, 2025

Describe the bug

After logging out, app redirects to root "/" of the host, which makes an undesired experience, when the app is deployed under a path else than the default root_path, that is a common case for one who puts gradio behind a reverse proxy.

Have you searched existing issues? 🔎

  • I have searched and found no existing issues

Reproduction

import gradio as gr

with gr.Blocks() as app:
    logout_button = gr.Button("Logout", link="logout")

app.launch(root_path="/foobar")

Screenshot

No response

Logs

No response

System Info

Gradio Environment Information:
------------------------------
Operating System: Linux
gradio version: 5.9.1
gradio_client version: 1.5.2

------------------------------------------------
gradio dependencies in your environment:

aiofiles: 23.2.1
anyio: 4.7.0
audioop-lts is not installed.
fastapi: 0.115.6
ffmpy: 0.5.0
gradio-client==1.5.2 is not installed.
httpx: 0.28.1
huggingface-hub: 0.27.0
jinja2: 3.0.3
markupsafe: 2.0.1
numpy: 2.2.1
orjson: 3.10.13
packaging: 21.3
pandas: 2.2.3
pillow: 11.1.0
pydantic: 2.10.4
pydub: 0.25.1
python-multipart: 0.0.20
pyyaml: 5.4.1
ruff: 0.8.5
safehttpx: 0.1.6
semantic-version: 2.10.0
starlette: 0.41.3
tomlkit: 0.13.2
typer: 0.15.1
typing-extensions: 4.12.2
urllib3: 1.26.5
uvicorn: 0.34.0
authlib; extra == 'oauth' is not installed.
itsdangerous; extra == 'oauth' is not installed.


gradio_client dependencies in your environment:

fsspec: 2024.12.0
httpx: 0.28.1
huggingface-hub: 0.27.0
packaging: 21.3
typing-extensions: 4.12.2
websockets: 14.1

Severity

I can work around it

@ktanff ktanff added the bug Something isn't working label Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant