dosubot[bot] commented on issue #35464: URL: https://github.com/apache/superset/issues/35464#issuecomment-3364142700
<!-- Answer --> This is a known issue in Superset 6.0.0rc2: when you set `SUPERSET_APP_ROOT` to a custom prefix, Swagger UI still tries to fetch the OpenAPI spec from `/api/v1/_openapi` instead of the prefixed path (e.g., `/analytics/api/v1/_openapi`), resulting in a 404 error. The backend routing (via AppRootMiddleware) expects all requests to include the prefix, but the frontend Swagger UI does not dynamically adjust its fetch URL to match [`source`](https://github.com/apache/superset/issues/33304). There is currently no built-in configuration to fix this in Superset. Some users suggested a workaround by manually specifying the OpenAPI spec URL in the Swagger UI config, e.g.: ```python OPENAPI_SWAGGER_UI_CONFIG = { "url": "/analytics/api/v1/_openapi" } ``` —but this option is not yet implemented in Superset [`source`](https://github.com/apache/superset/issues/33304). Recent fixes (PR #34395, PR #34680) improved subpath support, but Swagger UI and some endpoints may still not fully respect the prefix. The feature is considered BETA and may require manual patching or proxy rewrites for full compatibility [`source`](https://github.com/apache/superset/issues/35027). If you need Swagger UI to work under a custom root, you can: - Manually access the OpenAPI spec at the correct prefixed URL. - Patch the frontend or proxy to rewrite the fetch URL. - Track ongoing fixes and test newer releases as they become available. For best results, ensure your environment variables (`SUPERSET_APP_ROOT`, `STATIC_ASSETS_PREFIX`, `APPLICATION_ROOT`) and proxy headers (`X-Forwarded-Prefix`) all match your desired prefix, and clear browser caches to avoid stale bootstrap data [`source`](https://github.com/apache/superset/issues/34773). <!-- 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/5367ddd1-9287-476d-9efd-c2effa8ba9cc?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/5367ddd1-9287-476d-9efd-c2effa8ba9cc?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/5367ddd1-9287-476d-9efd-c2effa8ba9cc?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/5367ddd1-9287-476d-9efd-c2effa8ba9cc?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/5367ddd1-9287-476d-9efd-c2effa8ba9cc?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/5367ddd1-9287-476d-9efd-c2effa8ba9cc?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/5367ddd1-9287-476d-9efd-c2effa8ba9cc?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=githu b) [](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/issues/35464) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
