service.xml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <service role="HUE" name="hue" version="1.0.0">
  2. <routes>
  3. <!-- 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 -->
  4. <route path="/hue/desktop/workers/{**}?{**}">
  5. <rewrite apply="HUE/hue/inbound/huerule" to="request.url"/>
  6. <rewrite apply="HUE/hue/outbound/headers" to="response.headers"/>
  7. <rewrite apply="HUE/hue/outbound/workers" to="response.body"/>
  8. </route>
  9. <route path="/hue/desktop/globalJsConstants.js?{**}">
  10. <rewrite apply="HUE/hue/inbound/huerule" to="request.url"/>
  11. <rewrite apply="HUE/hue/outbound/headers" to="response.headers"/>
  12. <rewrite apply="HUE/hue/outbound/global" to="response.body"/>
  13. </route>
  14. <!-- All URLs except above exceptions -->
  15. <route path="/hue/**">
  16. <rewrite apply="HUE/hue/inbound/huerule" to="request.url"/>
  17. <rewrite apply="HUE/hue/outbound/headers" to="response.headers"/>
  18. <rewrite apply="HUE/hue/outbound/huerooturl" to="response.body"/>
  19. </route>
  20. <route path="/hue/">
  21. <rewrite apply="HUE/hue/inbound/huerule" to="request.url"/>
  22. <rewrite apply="HUE/hue/outbound/headers" to="response.headers"/>
  23. <rewrite apply="HUE/hue/outbound/huerooturl" to="response.body"/>
  24. </route>
  25. <route path="/hue/**?**">
  26. <rewrite apply="HUE/hue/inbound/huerule" to="request.url"/>
  27. <rewrite apply="HUE/hue/outbound/headers" to="response.headers"/>
  28. <rewrite apply="HUE/hue/outbound/huerooturl" to="response.body"/>
  29. </route>
  30. <route path="/hue/?**">
  31. <rewrite apply="HUE/hue/inbound/huerule" to="request.url"/>
  32. <rewrite apply="HUE/hue/outbound/headers" to="response.headers"/>
  33. <rewrite apply="HUE/hue/outbound/huerooturl" to="response.body"/>
  34. </route>
  35. </routes>
  36. <dispatch classname="org.apache.knox.gateway.dispatch.ConfigurableDispatch" ha-classname="org.apache.knox.gateway.dispatch.ConfigurableDispatch">
  37. <param>
  38. <name>responseExcludeHeaders</name>
  39. <value>WWW-AUTHENTICATE</value>
  40. </param>
  41. </dispatch>
  42. </service>