Skip to content

PLAT-144996: Fixing spark ui base path url#14

Open
c3-rohithbandaru wants to merge 1 commit intoexm-develop-spark-v3.5from
epic/platform/rb/PLAT-144996
Open

PLAT-144996: Fixing spark ui base path url#14
c3-rohithbandaru wants to merge 1 commit intoexm-develop-spark-v3.5from
epic/platform/rb/PLAT-144996

Conversation

@c3-rohithbandaru
Copy link
Copy Markdown

@c3-rohithbandaru c3-rohithbandaru commented Apr 15, 2026

Summary

Fixes Spark UI when served behind a reverse proxy at a custom base path (spark.ui.proxyBasePath). Previously, internal redirects and API endpoints ignored the base path, causing 302s to wrong URLs and 404s.

What changed:

JettyUtils -- Redirect handlers now derive basePath from the request context and emit relative Location headers instead of absolute URLs pointing at the internal Spark address. Added ProxyRedirectHandler awareness of uiRoot for pre-dispatch redirects.
ApiRootResource -- REST API (/api) mounts under basePath so it's reachable at /api.
PrometheusResource -- Left untouched; /metrics always mounts at root (no proxy path needed).
SparkUI / SparkContext / UI.scala -- Reads new spark.ui.proxyBasePath config, threads basePath through to all handler and redirect registrations.
UIUtils -- uiRoot / prependBaseUri cleaned up; removed noisy per-request logging

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant