GitHub user dosubot[bot] added a comment to the discussion: Getting 404 error
on welcome page
<!-- Answer -->
Your double-prefix issue (/superset/superset/welcome) and 404 after login are
caused by both Superset and your proxy/Istio setup handling the subpath prefix,
resulting in the prefix being stripped twice. This is a known pitfall with
Superset's subpath deployment and AppRootMiddleware in 6.0+.
Here's how to fix it:
1. **Istio VirtualService rewrite:**
Make sure your Istio config strips the /superset prefix before forwarding to
Superset. The backend should receive paths like /welcome, not
/superset/welcome. Your VirtualService should have a rewrite rule like:
```yaml
rewrite:
uri: /
```
for `/superset` and
```yaml
rewrite:
uri: /$2
```
for `/superset/(.*)` (using regex match), so `/superset/welcome` becomes
`/welcome` for the backend. This prevents double prefixing.
2. **Superset config:**
Set only `SUPERSET_APP_ROOT=/superset` (in env) and `ENABLE_PROXY_FIX=True`
in your config. Remove manual settings for `APPLICATION_ROOT` and
`STATIC_ASSETS_PREFIX`โlet Superset auto-fill these to avoid double prefixing
and config drift.
[Reference](https://github.com/apache/superset/issues/35027)
3. **Proxy headers:**
Ensure Istio sets `X-Forwarded-Prefix: /superset` (no trailing slash) and
does not rewrite the path in a way that causes the prefix to be added twice.
[Reference](https://github.com/apache/superset/discussions/37376)
4. **Clear cache and restart:**
After making these changes, clear your browser cache and restart Superset to
refresh frontend bootstrap data and avoid stale URLs.
If you still see 404s or double prefixes, check Superset logs for errors about
subpath handling, and confirm that all static assets and routes are being
served under `/superset/*` as expected.
This setup matches the recommended approach for subpath deployments in Superset
6.0+ and should resolve your login and routing issues.
[More details](https://github.com/apache/superset/issues/35027)
<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
---
<sup>How did I do?
[Good](https://app.dosu.dev/response-feedback/8c7ec387-9cc8-46ee-9665-81d3c15352d6?feedback_type=great_response)
|
[Irrelevant](https://app.dosu.dev/response-feedback/8c7ec387-9cc8-46ee-9665-81d3c15352d6?feedback_type=irrelevant_answer)
|
[Incorrect](https://app.dosu.dev/response-feedback/8c7ec387-9cc8-46ee-9665-81d3c15352d6?feedback_type=incorrect_sources)
|
[Verbose](https://app.dosu.dev/response-feedback/8c7ec387-9cc8-46ee-9665-81d3c15352d6?feedback_type=too_verbose)
|
[Hallucination](https://app.dosu.dev/response-feedback/8c7ec387-9cc8-46ee-9665-81d3c15352d6?feedback_type=hallucination)
| [Report
๐](https://app.dosu.dev/response-feedback/8c7ec387-9cc8-46ee-9665-81d3c15352d6?feedback_type=bug_report)
|
[Other](https://app.dosu.dev/response-feedback/8c7ec387-9cc8-46ee-9665-81d3c15352d6?feedback_type=other)</sup>
[](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github) [](https://cursor.com/link/prompt?text=Your%20double-prefix%20issue%20%28/superset/superset/welcome%29%20and%20404%20after%20login%20are%20caused%20by%20both%20Superset%20and%20your%20proxy/Istio%20setup%20handling%20the%20subpath%20prefix%2C%20resulting%20in%20the%20prefix%20being%20stripped%20twice.%20This%20is%20a%20known%20pitfall%20with%20Superset%27s%20subpath%20deployment%20and%20AppRootMiddleware%20in%206.0%2B.%0A%0AHere%27s%20how%20to%20fix%20it%3A%0A%0A1.%20%2A%2AIstio%20VirtualService%20rewrite%3A%2A%2A%20%20%0A%20%20%20Make%20sure%20your%20Istio%20config%20strips%20the%20/superset%20prefix%20before%20forwarding%20to%20Superset.%20The%20backend%20should%20receive%20paths%20like%20/welcome%2C%20not%20/superset/welcome.%20Your%20VirtualService%20should%20have%20a%20rewrite%20rule%
20like%3A%0A%20%20%20%60%60%60yaml%0A%20%20%20rewrite%3A%0A%20%20%20%20%20uri%3A%20/%0A%20%20%20%60%60%60%0A%20%20%20for%20%60/superset%60%20and%0A%20%20%20%60%60%60yaml%0A%20%20%20rewrite%3A%0A%20%20%20%20%20uri%3A%20/%242%0A%20%20%20%60%60%60%0A%20%20%20for%20%60/superset/%28.%2A%29%60%20%28using%20regex%20match%29%2C%20so%20%60/superset/welcome%60%20becomes%20%60/welcome%60%20for%20the%20backend.%20This%20prevents%20double%20prefixing.%0A%0A2.%20%2A%2ASuperset%20config%3A%2A%2A%20%20%0A%20%20%20Set%20only%20%60SUPERSET_APP_ROOT%3D/superset%60%20%28in%20env%29%20and%20%60ENABLE_PROXY_FIX%3DTrue%60%20in%20your%20config.%20Remove%20manual%20settings%20for%20%60APPLICATION_ROOT%60%20and%20%60STATIC_ASSETS_PREFIX%60%E2%80%94let%20Superset%20auto-fill%20these%20to%20avoid%20double%20prefixing%20and%20config%20drift.%20%20%0A%20%20%20%5BReference%5D%28https%3A//github.com/apache/superset/issues/35027%29%0A%0A3.%20%2A%2AProxy%20headers%3A%2A%2A%20%20%0A%20%20%20Ensure%20Istio%20sets%20%6
0X-Forwarded-Prefix%3A%20/superset%60%20%28no%20trailing%20slash%29%20and%20does%20not%20rewrite%20the%20path%20in%20a%20way%20that%20causes%20the%20prefix%20to%20be%20added%20twice.%20%20%0A%20%20%20%5BReference%5D%28https%3A//github.com/apache/superset/discussions/37376%29%0A%0A4.%20%2A%2AClear%20cache%20and%20restart%3A%2A%2A%20%20%0A%20%20%20After%20making%20these%20changes%2C%20clear%20your%20browser%20cache%20and%20restart%20Superset%20to%20refresh%20frontend%20bootstrap%20data%20and%20avoid%20stale%20URLs.%0A%0AIf%20you%20still%20see%20404s%20or%20double%20prefixes%2C%20check%20Superset%20logs%20for%20errors%20about%20subpath%20handling%2C%20and%20confirm%20that%20all%20static%20assets%20and%20routes%20are%20being%20served%20under%20%60/superset/%2A%60%20as%20expected.%0A%0AThis%20setup%20matches%20the%20recommended%20approach%20for%20subpath%20deployments%20in%20Superset%206.0%2B%20and%20should%20resolve%20your%20login%20and%20routing%20issues.%20%20%0A%5BMore%20details%5D%2
8https%3A//github.com/apache/superset/issues/35027%29) [](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/37655)
GitHub link:
https://github.com/apache/superset/discussions/37655#discussioncomment-15690811
----
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]