Impala Public Jenkins has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/14199 )

Change subject: IMPALA-8917: Remove hostname from webui links if Knox isn't 
being used
......................................................................

IMPALA-8917: Remove hostname from webui links if Knox isn't being used

IMPALA-8897 added the hostname to all links on the debug webui in
order to facilitate proxying connections through Apache Knox. This
makes the webui difficult to use in situations where the hostname is
not DNS-resolvable.

This patch fixes this by only including the hostname with links if
Knox proxying is actually being used, which we determine by looking
for the 'x-forwarded-context' header in the request, which Knox adds
to all requests.

It also removes the hidden form fields that were added to support Knox
integration when not being accessed through Knox.

It also adds a class comment on Webserver explaining the requirements
for keeping the webui compatible with Knox.

Testing:
- Added a test that checks that links on the webui are made absolute
  when the 'x-forwarded-context' header is in the request.

Change-Id: Ifcf77058dc6ce1d72422a9e3ca7868cdffacff76
Reviewed-on: http://gerrit.cloudera.org:8080/14199
Reviewed-by: Thomas Tauber-Marshall <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>
---
M be/src/util/webserver.cc
M be/src/util/webserver.h
M tests/webserver/test_web_pages.py
M www/form-hidden-inputs.tmpl
4 files changed, 67 insertions(+), 26 deletions(-)

Approvals:
  Thomas Tauber-Marshall: Looks good to me, approved
  Impala Public Jenkins: Verified

--
To view, visit http://gerrit.cloudera.org:8080/14199
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ifcf77058dc6ce1d72422a9e3ca7868cdffacff76
Gerrit-Change-Number: 14199
Gerrit-PatchSet: 6
Gerrit-Owner: Thomas Tauber-Marshall <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Lars Volker <[email protected]>
Gerrit-Reviewer: Thomas Tauber-Marshall <[email protected]>
Gerrit-Reviewer: Tim Armstrong <[email protected]>

Reply via email to