This is an automated email from the ASF dual-hosted git repository.

more pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/knox.git


The following commit(s) were added to refs/heads/master by this push:
     new 0546550  KNOX-2258 - Add filter for Location header (#277)
0546550 is described below

commit 054655049b2bf35030e1566f10135c949c2316e0
Author: Abhishek Shukla <[email protected]>
AuthorDate: Wed Mar 4 21:26:49 2020 +0530

    KNOX-2258 - Add filter for Location header (#277)
---
 .../src/main/resources/services/livy/0.4.0/rewrite.xml              | 6 ++++++
 .../src/main/resources/services/livy/0.4.0/service.xml              | 4 ++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git 
a/gateway-service-definitions/src/main/resources/services/livy/0.4.0/rewrite.xml
 
b/gateway-service-definitions/src/main/resources/services/livy/0.4.0/rewrite.xml
index 9241a7c..7080d68 100644
--- 
a/gateway-service-definitions/src/main/resources/services/livy/0.4.0/rewrite.xml
+++ 
b/gateway-service-definitions/src/main/resources/services/livy/0.4.0/rewrite.xml
@@ -49,4 +49,10 @@
     <rewrite template="{$frontend[url]}/livy/ui/"/>
   </rule>
 
+  <filter name="LIVYSERVER/livy/outbound/headers">
+    <content type="application/x-http-headers">
+      <apply path="Location" rule="LIVYSERVER/livy/outbound/headers/ui"/>
+    </content>
+  </filter>
+
 </rules>
diff --git 
a/gateway-service-definitions/src/main/resources/services/livy/0.4.0/service.xml
 
b/gateway-service-definitions/src/main/resources/services/livy/0.4.0/service.xml
index 77c4ebc..ecac66d 100644
--- 
a/gateway-service-definitions/src/main/resources/services/livy/0.4.0/service.xml
+++ 
b/gateway-service-definitions/src/main/resources/services/livy/0.4.0/service.xml
@@ -25,10 +25,10 @@
   <routes>
     <route path="/livy/**?**"/>
     <route path="/livy">
-        <rewrite apply="LIVYSERVER/livy/outbound/headers/ui" 
to="response.headers"/>
+        <rewrite apply="LIVYSERVER/livy/outbound/headers" 
to="response.headers"/>
     </route>
     <route path="/livy/">
-        <rewrite apply="LIVYSERVER/livy/outbound/headers/ui" 
to="response.headers"/>
+        <rewrite apply="LIVYSERVER/livy/outbound/headers" 
to="response.headers"/>
     </route>
   </routes>
   <dispatch classname="org.apache.knox.gateway.livy.LivyDispatch"/>

Reply via email to