risdenk commented on a change in pull request #97: KNOX-1862 - Add Service 
Definition for Hue UI
URL: https://github.com/apache/knox/pull/97#discussion_r290052645
 
 

 ##########
 File path: 
gateway-service-definitions/src/main/resources/services/hue/1.0.0/service.xml
 ##########
 @@ -0,0 +1,37 @@
+<service role="HUE" name="hue" version="1.0.0">
+  <routes>
+    <!-- Since we don't have to rewrite URLs for all javascript, we single out 
these 2 exceptions: 1 for workers & the other for the base URL -->
+    <route path="/hue/desktop/workers/{**}?{**}">
+      <rewrite apply="HUE/hue/inbound/huerule" to="request.url"/>
+      <rewrite apply="HUE/hue/outbound/headers" to="response.headers"/>
+      <rewrite apply="HUE/hue/outbound/workers" to="response.body"/>
+    </route>
+    <route path="/hue/desktop/globalJsConstants.js?{**}">
+      <rewrite apply="HUE/hue/inbound/huerule" to="request.url"/>
+      <rewrite apply="HUE/hue/outbound/headers" to="response.headers"/>
+      <rewrite apply="HUE/hue/outbound/global" to="response.body"/>
+    </route>
+    <!-- All URLs except above exceptions -->
+    <route path="/hue/**">
+      <rewrite apply="HUE/hue/inbound/huerule" to="request.url"/>
+      <rewrite apply="HUE/hue/outbound/headers" to="response.headers"/>
+      <rewrite apply="HUE/hue/outbound/huerooturl" to="response.body"/>
+    </route>
+    <route path="/hue/">
+      <rewrite apply="HUE/hue/inbound/huerule" to="request.url"/>
+      <rewrite apply="HUE/hue/outbound/headers" to="response.headers"/>
+      <rewrite apply="HUE/hue/outbound/huerooturl" to="response.body"/>
+    </route>
+    <route path="/hue/**?**">
+      <rewrite apply="HUE/hue/inbound/huerule" to="request.url"/>
+      <rewrite apply="HUE/hue/outbound/headers" to="response.headers"/>
+      <rewrite apply="HUE/hue/outbound/huerooturl" to="response.body"/>
+    </route>
+    <route path="/hue/?**">
+      <rewrite apply="HUE/hue/inbound/huerule" to="request.url"/>
+      <rewrite apply="HUE/hue/outbound/headers" to="response.headers"/>
+      <rewrite apply="HUE/hue/outbound/huerooturl" to="response.body"/>
+    </route>
+  </routes>
+  <dispatch 
classname="org.apache.knox.gateway.dispatch.PassAllHeadersDispatch" />
 
 Review comment:
   This here means that this won't use Knox authentication and instead will 
rely on the backend to handle auth. Since the basic auth header will be passed 
through.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to