knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lmc...@apache.org
Subject knox git commit: KNOX-1295 - X-Forwarded-Context contains not the full base path in SHS request (Atilla Csoma and Marco Gaido via lmccay)
Date Tue, 08 May 2018 13:35:30 GMT
Repository: knox
Updated Branches:
  refs/heads/master 069c028cb -> c7477c12f


KNOX-1295 - X-Forwarded-Context contains not the full base path in SHS request (Atilla Csoma
and Marco Gaido via lmccay)

Project: http://git-wip-us.apache.org/repos/asf/knox/repo
Commit: http://git-wip-us.apache.org/repos/asf/knox/commit/c7477c12
Tree: http://git-wip-us.apache.org/repos/asf/knox/tree/c7477c12
Diff: http://git-wip-us.apache.org/repos/asf/knox/diff/c7477c12

Branch: refs/heads/master
Commit: c7477c12ffc7aadc0a89c11da36104cdacdd92fb
Parents: 069c028
Author: Larry McCay <lmccay@hortonworks.com>
Authored: Tue May 8 09:35:19 2018 -0400
Committer: Larry McCay <lmccay@hortonworks.com>
Committed: Tue May 8 09:35:19 2018 -0400

----------------------------------------------------------------------
 .../resources/services/sparkhistoryui/1.4.0/rewrite.xml     | 9 +++++++++
 .../resources/services/sparkhistoryui/1.4.0/service.xml     | 8 ++++++--
 2 files changed, 15 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/knox/blob/c7477c12/gateway-service-definitions/src/main/resources/services/sparkhistoryui/1.4.0/rewrite.xml
----------------------------------------------------------------------
diff --git a/gateway-service-definitions/src/main/resources/services/sparkhistoryui/1.4.0/rewrite.xml
b/gateway-service-definitions/src/main/resources/services/sparkhistoryui/1.4.0/rewrite.xml
index 4e7a375..740369c 100644
--- a/gateway-service-definitions/src/main/resources/services/sparkhistoryui/1.4.0/rewrite.xml
+++ b/gateway-service-definitions/src/main/resources/services/sparkhistoryui/1.4.0/rewrite.xml
@@ -90,6 +90,10 @@
       <rewrite template="{$frontend[url]}/sparkhistory/history/{**}/jobs/"/>
     </match>
   </rule>
+  <rule dir="IN" name="SPARKHISTORYUI/sparkhistory/outbound/rqheaders/xfc">
+    <match pattern="{**}"/>
+    <rewrite template="{**}/sparkhistoryui" />
+  </rule>
 
   <filter name="SPARKHISTORYUI/sparkhistory/outbound/headers">
     <content type="application/x-http-headers">
@@ -101,4 +105,9 @@
       <apply path="Location" rule="SPARKHISTORYUI/sparkhistory/outbound/headers/jobs/location"/>
     </content>
   </filter>
+  <filter name="SPARKHISTORYUI/sparkhistory/outbound/rqheaders">
+    <content type="application/x-http-headers">
+      <apply path="X-Forwarded-Context" rule="SPARKHISTORYUI/sparkhistory/outbound/rqheaders/xfc"/>
+    </content>
+  </filter>
 </rules>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/knox/blob/c7477c12/gateway-service-definitions/src/main/resources/services/sparkhistoryui/1.4.0/service.xml
----------------------------------------------------------------------
diff --git a/gateway-service-definitions/src/main/resources/services/sparkhistoryui/1.4.0/service.xml
b/gateway-service-definitions/src/main/resources/services/sparkhistoryui/1.4.0/service.xml
index 3662cd5..e42c2c6 100644
--- a/gateway-service-definitions/src/main/resources/services/sparkhistoryui/1.4.0/service.xml
+++ b/gateway-service-definitions/src/main/resources/services/sparkhistoryui/1.4.0/service.xml
@@ -17,8 +17,12 @@
 -->
 <service role="SPARKHISTORYUI" name="sparkhistory" version="1.4.0">
     <routes>
-        <route path="/sparkhistory/"/>
-        <route path="/sparkhistory/**"/>
+        <route path="/sparkhistory/">
+            <rewrite apply="SPARKHISTORYUI/sparkhistory/outbound/rqheaders" to="request.headers"/>
+        </route>
+        <route path="/sparkhistory/**">
+            <rewrite apply="SPARKHISTORYUI/sparkhistory/outbound/rqheaders" to="request.headers"/>
+        </route>
         <route path="/sparkhistory/**?**"/>
         <route path="/sparkhistory/history/**?**">
             <rewrite apply="SPARKHISTORYUI/sparkhistory/outbound/headers" to="response.headers"/>


Mime
View raw message