GitHub user mgaido91 opened a pull request: https://github.com/apache/spark/pull/21268
[SPARK-24209][SHS] Automatic retrieve proxyBase from Knox headers ## What changes were proposed in this pull request? The PR retrieves the proxyBase automatically from the header `X-Forwareded-Context` (if available). This is the header used by Knox to inform the proxied service about the base path. This provides 0-configuration support for Knox gateway (instead of having to properly set `spark.ui.proxyBase`) and it allows to access directly SHS when it is proxied by Knox. In the previous scenario, indeed, after setting `spark.ui.proxyBase`, direct access to SHS was not working fine (due to bad link generated). ## How was this patch tested? added UT + manual tests You can merge this pull request into a Git repository by running: $ git pull https://github.com/mgaido91/spark SPARK-24209 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/21268.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #21268 ---- commit 0af9c2ab7ce1cb377574932d197f681809374c85 Author: Marco Gaido <marcogaido91@...> Date: 2018-04-02T09:02:47Z [SPARK-24209][SHS] Automatic retrieve proxyBase from Knox headers ---- --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org