GitHub user dosubot[bot] added a comment to the discussion: Login redirection does not use subpath prefix
<!-- Greeting --> Hi @thiagogquinto! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the superset team. <!-- Answer --> This is a known bug in Superset where post-login redirects don't respect `SUPERSET_APP_ROOT`. The fix was merged in [PR #37942](https://github.com/apache/superset/pull/37942) and is available in Superset 6.1+. If you're on 6.0.0, you'll need to upgrade to get the fix. In addition to setting `SUPERSET_APP_ROOT`, you should also configure your Traefik proxy to pass the `X-Forwarded-Prefix` header and enable the proxy fix in Superset. Here's what to add: **In your `superset_config.py`:** ```python ENABLE_PROXY_FIX = True PROXY_FIX_CONFIG = {"x_for": 1, "x_proto": 1, "x_host": 1, "x_port": 1, "x_prefix": 1} ``` **In your Traefik labels**, add a middleware to set the forwarded prefix header: ```yaml - "traefik.http.middlewares.superset-prefix.headers.customrequestheaders.X-Forwarded-Prefix=/analytics" - "traefik.http.routers.superset.middlewares=superset-prefix" ``` Also make sure your Traefik configuration strips the `/analytics` prefix before forwarding to Superset (so that Superset receives `/superset/welcome/` rather than `/analytics/superset/welcome/`), since `SUPERSET_APP_ROOT` handles prepending the prefix on the response side. You can use Traefik's `StripPrefix` middleware for this: ```yaml - "traefik.http.middlewares.superset-strip.stripprefix.prefixes=/analytics" - "traefik.http.routers.superset.middlewares=superset-strip,superset-prefix" ``` **Key points:** - This login redirect bug was fixed after Superset 6.0.0 [[1]](https://github.com/apache/superset/issues/37518) [[2]](https://github.com/apache/superset/pull/37942) - The `X-Forwarded-Prefix` header is critical for proper URL generation behind a reverse proxy [[3]](https://github.com/apache/superset/discussions/37376) - Be careful about double-prefixing — ensure your proxy strips the prefix before forwarding, and let Superset's `SUPERSET_APP_ROOT` handle adding it back [[4]](https://github.com/apache/superset/discussions/37655#discussioncomment-15690811) What version of Superset are you running? If you're on 6.1+ and still seeing this issue, there may be additional configuration needed. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).* --- Share context across your team and agents. Try [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-tagline&utm_term=apache%2Fsuperset). [](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-feedback&utm_term=apache%2Fsuperset&message_id=3a9c01be-694b-429e-8cfb-8571c6f2f098) [](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-learn-repo&utm_term=apache%2Fsuperset) [](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-add-team&utm_term=apache%2Fsuperset) GitHub link: https://github.com/apache/superset/discussions/40082#discussioncomment-16898684 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
