innovark37 commented on code in PR #37523:
URL: https://github.com/apache/superset/pull/37523#discussion_r3510840634
##########
superset/views/base.py:
##########
@@ -591,6 +591,23 @@ def get_spa_payload(extra_data: dict[str, Any] | None =
None) -> dict[str, Any]:
return payload
+def _ensure_static_assets_prefix(url_or_path: str) -> str:
+ """Add the configured static asset prefix to root-relative asset paths."""
+ static_assets_prefix = app.config.get("STATIC_ASSETS_PREFIX", "")
+
+ if not url_or_path.startswith("/") or not static_assets_prefix:
Review Comment:
Good catch, thanks. I updated the helper to treat protocol-relative URLs as
passthrough and added a regression test next to
`test_brandspinnerurl_keeps_absolute_url`.
--
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]