upczsh commented on code in PR #829:
URL: https://github.com/apache/knox/pull/829#discussion_r1512424584


##########
gateway-service-definitions/src/main/resources/services/hdfsui/3.0.0/rewrite.xml:
##########
@@ -155,6 +155,9 @@
   <rule dir="OUT" name="HDFSUI/hdfs/outbound/logs/files" pattern="/logs/{**}">
     <rewrite template="{gateway.url}/hdfs/logs/{**}?host={$inboundurl[host]}"/>
   </rule>
+  <rule dir="OUT" name="HDFSUI/hdfs/outbound/topology" pattern="topology">

Review Comment:
   If the URL is similar to http://xxx:port/xxx/topology, you can only use 
pattern="topology" to proxy. If it is http://xxx:port/xxx/topology/xxx, you can 
use pattern="topology/{\*\*}"
   this is my test : 
   use pattern="topology/{\*\*}"
   
![image](https://github.com/apache/knox/assets/50791733/b73a71ad-b14b-49e4-a4ee-e22174599c2d)
   Report an error:
   
![image](https://github.com/apache/knox/assets/50791733/4cab115b-0ee2-4de1-abcf-cce62c72bf8c)
   Therefore, I refer to the current writing method in hdfs rewrite.xml. 
   like this : `  <rule dir="OUT" name="HDFSUI/hdfs/outbound/jmxhtml" 
pattern="jmx">
       <rewrite template="{gateway.url}/hdfs/jmx/?host={$inboundurl[host]}"/>
     </rule>
     <rule dir="OUT" name="HDFSUI/hdfs/outbound/confhtml" pattern="conf">
       <rewrite template="{gateway.url}/hdfs/conf/?host={$inboundurl[host]}"/>
     </rule>
     <rule dir="OUT" name="HDFSUI/hdfs/outbound/stackshtml" pattern="stacks">
       <rewrite template="{gateway.url}/hdfs/stacks/?host={$inboundurl[host]}"/>
     </rule>`



-- 
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.

To unsubscribe, e-mail: dev-unsubscr...@knox.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to