Kyle Winkelman created SPARK-28504: -------------------------------------- Summary: Web UI does not always honor spark.ui.proxyBase and X-Forwarded-Context Key: SPARK-28504 URL: https://issues.apache.org/jira/browse/SPARK-28504 Project: Spark Issue Type: Bug Components: Web UI Affects Versions: 2.4.3 Reporter: Kyle Winkelman
When running the Web UI behind a proxy, links in the html correctly honor spark.ui.proxyBase and X-Forwarded-Context in [UIUtils#uiRoot|[https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/ui/UIUtils.scala]]. Two items that I have found that do not honor spark.ui.proxyBase and X-Forwarded-Context: # History server links from the main page produce a request like [http://localhost:8888/proxy/18080/history/spark-application-1563978242545/1/jobs/] which will then redirect to [http://localhost:8888/history/spark-application-1563975642858/jobs/]. # Static redirects like when entering the Web UI with a request like [http://localhost:8888/proxy/4040] which will then redirect to [http://localhost:8888/jobs]. I believe that these correspond to: # [HistoryServer#loaderServlet|[https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/deploy/history/HistoryServer.scala#L100-L101|https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/deploy/history/HistoryServer.scala]] # [JettyUtils#createRedirectHandler|[https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/ui/JettyUtils.scala#L124-L158]] I do not know if this is a complete list but I think these instances can be fixed by using UIUtils.uiRoot. {code:java} // HistoryServer val requestURI = UIUtils.uiRoot(req) + Option(req.getQueryString).map("?" + _).getOrElse("") // JettyUtils val newUrl = new URL(new URL(UIUtils.uiRoot(request)), prefixedDestPath).toString{code} -- This message was sent by Atlassian JIRA (v7.6.14#76016) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org