dosubot[bot] commented on issue #38881: URL: https://github.com/apache/superset/issues/38881#issuecomment-4133952382
<!-- Answer --> You've identified a real bug. The logo path is [hardcoded in the theme configuration](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/packages/superset-ui-core/src/theme/Theme.tsx#L68) as `/static/assets/images/superset-logo-horiz.png` without using the `ensureAppRoot()` utility that correctly prefixes URLs with the application root path. This was **fixed in [PR #36058](https://github.com/apache/superset/pull/36058)** which introduced the `ensureStaticPrefix()` utility function to properly handle static asset paths with APP_ROOT prefixes. If you're on `master / latest-dev`, you may already have this fix—try pulling the latest changes. **Workaround** (if you're on an older version): Add an nginx redirect rule: ```nginx if ($request_uri = "/static/assets/images/superset-logo-horiz.png") { return 301 /your-prefix/static/assets/images/superset-logo-horiz.png; } ``` Note: Subpath/APP_ROOT support is [in BETA as of Superset 6.0](https://github.com/apache/superset/issues/35027) with some known edge cases. For versions before 6.0, [subdomain-based reverse proxying is more reliable](https://github.com/apache/superset/discussions/37376) than path-based deployment. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=brand-link).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/20cf9b5f-00b7-457e-8961-2a44d56cc4fd?feedback_type=great_response&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/20cf9b5f-00b7-457e-8961-2a44d56cc4fd?feedback_type=irrelevant_answer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/20cf9b5f-00b7-457e-8961-2a44d56cc4fd?feedback_type=incorrect_sources&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/20cf9b5f-00b7-457e-8961-2a44d56cc4fd?feedback_type=too_verbose&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/20cf9b5f-00b7 -457e-8961-2a44d56cc4fd?feedback_type=hallucination&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/20cf9b5f-00b7-457e-8961-2a44d56cc4fd?feedback_type=bug_report&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-bug_report) | [Other](https://app.dosu.dev/response-feedback/20cf9b5f-00b7-457e-8961-2a44d56cc4fd?feedback_type=other&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=chat-badge) [](https://cursor.com/link/prompt?text=You%27ve%20identified%20a%20real%20bug.%20The%20logo%20path%20is%20%5Bhardcoded%20in%20the%20theme%20configuration%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/packages/superset-ui-core/src/theme/Theme.tsx%23L68%29%20as%20%60/static/assets/images/superset-logo-horiz.png%60%20without%20using%20the%20%60ensureAppRoot%28%29%60%20utility%20that%20correctly%20prefixes%20URLs%20with%20the%20application%20root%20path.%0A%0AThis%20was%20%2A%2Afixed%20in%20%5BPR%20%2336058%5D%28https%3A//github.com/apache/superset/pull/36058%29%2A%2A%20which%20introduced%20the%20%60ensureStaticPrefix%28%29%60%20utility%20function%20to%20pr operly%20handle%20static%20asset%20paths%20with%20APP_ROOT%20prefixes.%20If%20you%27re%20on%20%60master%20/%20latest-dev%60%2C%20you%20may%20already%20have%20this%20fix%E2%80%94try%20pulling%20the%20latest%20changes.%0A%0A%2A%2AWorkaround%2A%2A%20%28if%20you%27re%20on%20an%20older%20version%29%3A%0A%0AAdd%20an%20nginx%20redirect%20rule%3A%0A%60%60%60nginx%0Aif%20%28%24request_uri%20%3D%20%22/static/assets/images/superset-logo-horiz.png%22%29%20%7B%0A%20%20return%20301%20/your-prefix/static/assets/images/superset-logo-horiz.png%3B%0A%7D%0A%60%60%60%0A%0ANote%3A%20Subpath/APP_ROOT%20support%20is%20%5Bin%20BETA%20as%20of%20Superset%206.0%5D%28https%3A//github.com/apache/superset/issues/35027%29%20with%20some%20known%20edge%20cases.%20For%20versions%20before%206.0%2C%20%5Bsubdomain-based%20reverse%20proxying%20is%20more%20reliable%5D%28https%3A//github.com/apache/superset/discussions/37376%29%20than%20path-based%20deployment.) [](https://go.dosu.dev/discord-bot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=join-discord) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/38881) -- 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]
